That does not work at all. Justin
----- Original Message ---- From: Juanjo Cuadrado <[EMAIL PROTECTED]> To: Tomcat Users List <users@tomcat.apache.org> Sent: Tuesday, November 7, 2006 4:14:17 AM Subject: Re: Include Directive Hi, Can you try the follow: <%@ include file="*/header.jsp*" %> I think that this will work fine. 2006/11/7, Justin Jaynes <[EMAIL PROTECTED]>: > > Hello, > > I am trying to eliminate unnecessary duplication of code by using include > directives. Currently my directory structure is like this: > > [main app directory] > index.jsp > header.jsp > footer.jsp > [admin subdirectory] > index.jsp > > The index.jsp file in the main directory contains the code <%@ include > file="header.jsp" %> and it works great. > > In the admin directory the index.jsp file contains this code <%@ include > file="../header.jsp" %> obviously referencing to the parent directory, where > the header.jsp file sits. I don't want to have to copy it to the child > directory and maintain two copies of it. > > But when I do this, I get an error every time. What am I doing > wrong? You can find the error below. > > Justin > > HTTP Status 500 - type Exception report > message > description The server encountered an internal error () that prevented it > from fulfilling this request. > exception > org.apache.jasper.JasperException: /index.jsp(4,0) File "/../header.jsp" > not found > org.apache.jasper.servlet.JspServletWrapper.handleJspException( > JspServletWrapper.java:512) > org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:377) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java > :314) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > root cause > org.apache.jasper.JasperException: /index.jsp(4,0) File "/../header.jsp" > not found > org.apache.jasper.compiler.DefaultErrorHandler.jspError( > DefaultErrorHandler.java:39) > org.apache.jasper.compiler.ErrorDispatcher.dispatch( > ErrorDispatcher.java:405) > org.apache.jasper.compiler.ErrorDispatcher.jspError( > ErrorDispatcher.java:86) > org.apache.jasper.compiler.Parser.processIncludeDirective( > Parser.java:339) > org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java > :372) > org.apache.jasper.compiler.Parser.parseDirective(Parser.java:484) > org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556) > org.apache.jasper.compiler.Parser.parse(Parser.java:126) > org.apache.jasper.compiler.ParserController.doParse( > ParserController.java:211) > org.apache.jasper.compiler.ParserController.parse( > ParserController.java:100) > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) > org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) > org.apache.jasper.JspCompilationContext.compile( > JspCompilationContext.java:563) > org.apache.jasper.servlet.JspServletWrapper.service( > JspServletWrapper.java:305) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java > :314) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]