tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Balazuc" <>
Subject JSP paths
Date Mon, 29 Oct 2001 16:28:38 GMT
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"%>

<%@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:   <>
For additional commands, e-mail: <>

View raw message