tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: inlcude not working
Date Mon, 03 Feb 2003 19:28:50 GMT
Not sure why <%@ include file="../common/navbar.jsp"%> works in 4.1.12 (I'm
pretty sure this fails in 4.1.19). As Filip points out, the include directive
and the jsp:include action are for including resources from the same context as
the current page. You might want to check out JSTL's <c:import> tag:

<c:import url="/navbar.jsp" context="/common"/>

Quoting Filip Hanik <Filip.Hanik@evant.com>:

> you can't include files from a different webapp
> 
> Filip
> 
> -----Original Message-----
> From: chowatt@YOTTAYOTTA.COM [mailto:chowatt@YOTTAYOTTA.COM]
> Sent: Monday, February 03, 2003 10:24 AM
> To: tomcat-user@jakarta.apache.org
> Subject: JSP:inlcude not working
> 
> 
> I am porting an application from tomcat 3.2.3 to tomcat 4.1.12 and am
> having
> a problem with jsp:inlcude.
> 
> I have a directory structure like this
> 
> webapps/common/<common jsps>
> webapps/admin/<specific jsps>
> 
> The <common jsps> directory contains a menu that I use in all of the
> specific jsp pages.  This menu is 
> just a table that does a bit of data processing to determine what menu
> items
> a specific user should see.
> 
> Anyway, in version 3.2.3 the code to include the menu looks like this:
> 
> <jsp:include page="../common/navbar.jsp" flush="true">
> 
> but in 4.1.12 this does not work.  If, however, I change it to 
> 
> <%@ include file="../common/navbar.jsp"%>
> 
> it works fine.
> 
> 
> To further complicate things, if I place the navbar.jsp in the same
> directory as the specific jsps and add this code 
> 
> <jsp:include page="navbar.jsp" flush="true">
> 
> it also works fine.
> 
> 
> Anyone have any thoughts on why?
> 
> C.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message