problem with navigation
pankajjain_1510 May 17, 2010 9:41 AMhi
i have developed a jsp as following its name is menu.jsp
<f:view>
<rich:dropDownMenu submitMode="server">
<f:facet name="label">
<h:panelGroup>
<h:outputText value="Inventory Control" />
</h:panelGroup>
</f:facet>
<rich:menuGroup value="Inventory Maintainces" >
<rich:menuItem submitMode="Server" value="Finished Item"
action="finisheditem" />
<rich:menuItem submitMode="Server" value="Labor code and charges "
action="labor_code_charges" >
</rich:menuItem>
<rich:menuItem submitMode="server" value="Metal code and prices"
action="metal_code_prices">
</rich:menuItem>
<rich:menuItem submitMode="server" value="Diamond codes and prices"
action="diamond_code_prices">
</rich:menuItem>
</rich:dropDownMenu>
<f:view>
my home page is above one. and it shows the menu correctly .
Now when user select "finisheditem" for navigation its mapping is written in faces-config.xml as follows
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
<navigation-rule>
<from-view-id>/jsp/common/menu.jsp</from-view-id>
<navigation-case>
<from-outcome>Home</from-outcome>
<to-view-id>/jsp/common/home.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finisheditem</from-outcome>
<to-view-id>/jsp/inventory/finished_items/finisheditem.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>metal_code_prices</from-outcome>
<to-view-id>/jsp/inventory/metal_codes_prices/metal_ code _prices.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>labor_code_charges</from-outcome>
<to-view-id>/jsp/inventory/labor_ code _charges/labor_ code _charges.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>diamond_code_prices</from-outcome>
<to-view-id>/jsp/inventory/diamond_codes_prices/diamond_ code _prices.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>color_stone_code_prices</from-outcome>
<to-view-id>/jsp/inventory/color_stone_code_prices/color_stone_code_prices.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>diamond_inventory</from-outcome>
<to-view-id>/jsp/inventory/diamond/diamond_inventory.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
menu.jsp is a file which must present in each jsp as it contain menu. and i have include it in following way say finisheitem.jsp
but i am getting the following error
javax.servlet.ServletException: javax.servlet.jsp.JspException: Exception attemtping to write content above the <f:view> tag.
plz tell me what is the exact problem is ...