tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xeth Waxman <>
Subject Traversing up a directory using RequestDispatcher
Date Thu, 16 Sep 2004 23:51:27 GMT
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!
Xeth Waxman

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message