tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Villar <john.vil...@florhard.com>
Subject Re: Traversing up a directory using RequestDispatcher
Date Fri, 17 Sep 2004 12:20:39 GMT
if you're forwarding from the "ChargeCard" directory, you just have to 
include only the name of the page in the forward directive (e.g. 
"something.jsp" or "./something.jsp").... the trailing backslash is 
directly referring the root context of "this" host

John Villar
Gerente de Proyectos
Computadores Flor Hard Soft 2058 C.A.
www.florhard.com



Xeth Waxman escribió:

>I have a bizarre issue.  Using Tomcat 5.0.12, I have an application in
>the directory C:\jakarta-tomcat-5.0.12\webapps called ChargeCard. 
>After loggin in, I am trying to forward a request to jsp page in that
>directory.  However, RequestDispatcher apparently uses the directory
>C:\jakarta-tomcat-5.0.12\webapps\ROOT as the Document root, so I need
>to go up a directory in my forward request (something like url =
>"../ChargeCard/index.jsp";)  However, RequestDispatcher requires a /
>to start off the url, so I can't use the ../ start to go up a
>directory.  Does anyone have an idea how I would do this?  I tried url
>= "/../ChargeCard/index.jsp";, but that results in a
>NullPointerException being thrown.  All help is appreciated!
>  
>


Mime
View raw message