1) I'm not precisely clear on your use of the Context (I am a tad new at this). I would assume from your question that the proper response is this: I am tryig to leave my current Context and go to a 'parent' Context, not nessesarily the base context.
My test structure works out to the following: docroot/index.html docroot/testdir/index.jsp docroot/testdir/inc.jsp docroot/testdir/test2/index.jsp docroot/testdir/test2/inc.jsp The "not found" error occures when I try to include docroot/testdir/inc.jsp (which is in the parent directory) from the file docroot/testdir/test2/index.jsp 2) I have tried setting the CrossContext attribute to true as well as false, both having no affect 3) Although the option still exists to create a subdirectory off of the base context, I am trying to port an existing web app from Weblogic onto Tomcat. I would like to avoid moving files around if possible. What about the use of the <jsp:directive.include /> phrase rather than <@include>? Are there substantial differences? Andrew Conrad wrote: > So you are trying to leave your current Context and go into the base > context? > > Have you set your Context attribute "CrossContext" to true? > > Have you tried making a subdirectory in your current Context, place this > file with the relative include in it, and tried to request the file from > the base of the current context to see if that has any problems? > > - Andrew > > -----Original Message----- > From: Paul landolt [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 08, 2002 11:19 AM > To: [EMAIL PROTECTED] > Subject: Tomcat 4.0.3 and relative path includes. > > Hello All. I am a New poster, so I hope I'm following proper protocol. > > I am having trouble with relative path @includes in Tomcat 4.0.3. An > include from the same directory is fine, as is an include from a > sub-directory, like so: > > <%@include file="inc.jsp"%> > <%@include file="test2/inc.jsp"%> > > However, trying to include from a higher directory generates a JSP > compile error. The JSP code: > > <%@include file="../inc.jsp"%> > > generates the following error message: > > org.apache.jasper.compiler.CompileException: /testdir/test2/index.jsp(5,0) > File "../inc.jsp" not found > > (There's lots more to the dump, but I didn't think it was pertinent. And > yes, the file IS there) > > So, here are my questions: > > 1) Is this a known issue? Have other people encountered this? > 2) Is this a bug or a Spec feature? If a bug is there a bug report > pending on this? > 3) Is there a viable workaround for this? > 4) Is there a mechanism in JSP to determine the current directory (and > therefor build up an absolute path)? > > Thanks > > ...Paul > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
