I just created a new IceFaces application and I'm trying to include a navigation bar in all of the pages. When I use the jsp:directive.include
tag the file is included, but when I use jsp:include
it does not seem to be loaded. In fact, when I check the HTML source code in my browser, it's like the included file was completely empty. I do not want to use jsp:directive.include
because it will not automatically show any updates to the included file.
My environment: Eclipse 3.5, Tomcat 6, JSF 1.2, IceFaces 1.8.
Steps to reproduce the problem and pieces of code:
create a new Dynamic Web Project with the following options: Target runtime: Apache tomcat v6.0 Dynamic web module version: 2.5 Configuration: ICEfaces project
create a new ICEFaces JSPX file -- the home file. Some code:
<jsp:directive.page contentType="text/html;charset=ISO-8859-1" /> <f:view > <ice:outputDeclaration doctypeRoot="HTML" doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN" doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" /> <html> <head> <title>test file</title> <link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css" /> </head> <body> <jsp:directive.include file="./vertical_navigation.jsp" /> <!-- working --> <jsp:include page="./vertical_navigation.jsp" /> <!-- not working, no error though --> </body> </html> </f:view>
create the file to be included, also as a new ICEFaces JSPX file. Simplified code:
<ice:form> <ice:panelGrid columns="1" width="152"> <ice:graphicImage url="./img/image.jpg"></ice:graphicImage> <ice:panelCollapsible expanded="true"> <f:facet name="header"> <ice:panelGroup> <ice:outputText value="Customer"/> </ice:panelGroup> </f:facet> <ice:panelGrid columns="1"> <ice:commandLink action="customer"><ice:outputText value="Customer name" /></ice:commandLink> </ice:panelGrid> </ice:panelCollapsible> </ice:panelGrid> </ice:form> </body> </html> </f:view>
Some remarks:
- I'm completely new to JSF, so forgive me for any obvious mistake.
- In the home file (the first one) I'm not using both tags at the same time. I pasted both here just to show that I am trying both options.
- I created both files as "ICEFaces JSPX file", but the second one was assigned the .jsp extension.
- When I use the
directive.include
tag, the included file is loaded. But if I change it, it's not automatically republished.