You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mfaine <mf...@knology.net> on 2004/12/06 19:56:50 UTC

Tomcat 5 EL Expressions not evaluated in jsp:include files

Tomcat 5

I would like to create my JSPs as all XML like so:

<?xml version="1.0" ?>
<jsp:root version="2.0"
 xmlns:jsp="http://java.sun.com/JSP/Page"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:h="http://java.sun.com/jsf/html">
<f:view>
 <f:verbatim><![CDATA[<!DOCTYPE html
   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
 </f:verbatim>
<html xmlns="http://www.w3.org/1999/xhtml">
<jsp:include flush="false" page="../inc/head.jspf">
<jsp:param name="title" value="Logout"/>
</jsp:include>
<body>
 <f:loadBundle basename="general" var="msg"/>
 <f:loadBundle basename="logout" var="logoutmsg"/>
<jsp:include flush="true" page="../inc/topnav.jspf"/>
<jsp:include flush="true" page="../inc/header.jspf"/>
 <h:form>
   <h:panelGrid>
     <h:outputText value="#{logoutmsg.loggedout}"/>
     <h:outputText value="#{logoutmsg.closebrowser}"/>
   </h:panelGrid>
 </h:form>
 <jsp:include flush="true" page="../inc/footer.jspf"/>
</body>
</html>
</f:view>
</jsp:root>

Unfortunately the EL code in the included JSPs is not being evaluated.

It works fine if I use the <%@include%> directive but this is not XML
compatible.

Any help would be appreciated.

thanks,
-Mark 

Re: Tomcat 5 EL Expressions not evaluated in jsp:include files

Posted by Heath Borders <he...@gmail.com>.
Maybe you could try using JSTL include?


On 6 Dec 2004 18:56:50 -0000, mfaine <mf...@knology.net> wrote:
> Tomcat 5
> 
> I would like to create my JSPs as all XML like so:
> 
> <?xml version="1.0" ?>
> <jsp:root version="2.0"
> xmlns:jsp="http://java.sun.com/JSP/Page"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html">
> <f:view>
> <f:verbatim><![CDATA[<!DOCTYPE html
>   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">]]>
> </f:verbatim>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <jsp:include flush="false" page="../inc/head.jspf">
> <jsp:param name="title" value="Logout"/>
> </jsp:include>
> <body>
> <f:loadBundle basename="general" var="msg"/>
> <f:loadBundle basename="logout" var="logoutmsg"/>
> <jsp:include flush="true" page="../inc/topnav.jspf"/>
> <jsp:include flush="true" page="../inc/header.jspf"/>
> <h:form>
>   <h:panelGrid>
>     <h:outputText value="#{logoutmsg.loggedout}"/>
>     <h:outputText value="#{logoutmsg.closebrowser}"/>
>   </h:panelGrid>
> </h:form>
> <jsp:include flush="true" page="../inc/footer.jspf"/>
> </body>
> </html>
> </f:view>
> </jsp:root>
> 
> Unfortunately the EL code in the included JSPs is not being evaluated.
> 
> It works fine if I use the <%@include%> directive but this is not XML
> compatible.
> 
> Any help would be appreciated.
> 
> thanks,
> -Mark
> 


-- 
If you don't have a GMail account, I probably have 5 invites.  Just ask!
-Heath Borders-Wing
hborders@mail.win.org