You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Robert L. Brueckmann" <rb...@chessys.com> on 2003/12/15 19:23:46 UTC

jsp:include problem when using WAR

I cannot for the life of me find if this is a known issue or not but I'm
using Tomcat 4.0.3 and I have a web application that, throughout the
software, uses a single header.jsp file on every JSP page.  There are
multiple subdirectories that call that header.jsp file like so:

<jsp:include page="../header.jsp" flush="true" />

Because header.jsp exists in the root directory so all pages in
subdirectories make the above jsp:include call.this works beautifully when I
have the files in a directory, not WARed up in the webapps directory.but as
soon as I WAR everything up and drop the war file in the webapps directory,
I get blank pages in all the sections of the software that exist in
subdirectories that make the above jsp:include call.  Any page that exists
in the root directory that has a jsp:include call like so:

<jsp:include page="header.jsp" flush="true" />

Compiles just fine.in my log files for tomcat, it's telling me the following
when I try to access a section of the software that exists in a
subdirectory:

2003-12-15 12:41:42 StandardContext[/smartanalysis]:  Mapped to servlet
'jsp' with servlet path '/application/feequery/../header.jsp' and path info
'null' and update=true
2003-12-15 12:41:42 ApplicationDispatcher[/smartanalysis] Servlet.service()
for servlet jsp threw exception
javax.servlet.ServletException: /application/feequery/../header.jsp
          at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:212)
          at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
          at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474).etc.

Am I doing something wrong?  Like I said, when I expand the WAR and plave
the actual directory and files in the webapps directory, everything works
perfectly.as soon as it all gets WARed up.I encounter this problem.

Any help is greatly appreciated.

Thanks in advance, rlb