You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Denis Balazuc <de...@trader.com> on 2001/12/10 23:39:14 UTC

Me and include directives....

Hi all

I already have asked for some directions on how to use the include action
and the include directive and had very nice answers...
but I might have burned too much neurons on that and I'm still missing some
point...
...and...I experience some unexpected behaviour using the <%@ include
file="blah.jsp" %>

The quick ref on JSP I have
(http://java.sun.com/products/jsp/pdf/card12.pdf) tells me that include uses
a relative URL as the file parameter.
However, using relative URLs does not seem correct and I experience
differences while using Resin or Tomcat 3.2.x vs Tomcat 4.0...

When using Tomcat 4.0 or Resin, my relative URLs generally don't work the
same way as for Tomcat 3.2 :

(say I have "begin.jsp" in  <my webapp root>/common/begin.jsp)

In Resin and Tomcat 4.0, <%@ include file="../common/begin.jsp" %>) produces
a (404-Not Found) by the JSP engine.
However, this works perfectly with Tomcat 3.2....

Now, <%@ include file="/common/begin.jsp" %> works like a charm for Resin,
Tomcat 3.2 and Tomcat 4.0..
...and that's where I get confused....which version am I suppose to use ?

According to my quick ref card, I should be using relative URLs, and I'm
experiencing the exact contrary when I'm not using Tomcat 3.2...
I'm trying to use absolute URLs (because I want things to work with Tomcat
4.0 !) and make this a rule of thumb, but I'm not sure I've taken the good
decision.....
So, any definitive directions would help me getting out of the darkness...


Many thanks for your help !

Denis





--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>