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/10/29 17:28:38 UTC

JSP paths

Hi all

This may resemble a newbie question, but there's no place I can find a
definitive answer on the following :

-- when writing JSP files, that uses include statements, shall I only use
absolute paths, or is that better to have relative paths ?
I have found that Tomcat 3.2 is happy with relative paths, but further
versions are really unhappy with that, as is JRun.
As I'm about to refactor a few hundred pages, I actually need an answer
before starting to break anything...

So what's best : (say a.jsp lies in the "/include" path and I'm in the JSP
file "/denis/b.jsp" in the same context)

<%@include file="../include/a.jsp"%>

or
<%@include file="/include/a.jsp"%>

In the second case, doesn't that may lead to mixtures of contexts if a JSP
engine if all contexts have JSP files with absolute paths ?

(say I have a context "/" and another "/A" - what will be the result if "/A"
contains the
<%@include file="/include/a.jsp"%>
statement ??)

Thanks for any answer !
Denis Balazuc



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>