server.xml context paths with request forwarding in servlets
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alan_Forster
Posted On:   Friday, March 21, 2003 08:32 AM

When trying to forward to a JSP from a servlet, I am using a relative path (i.e. "/directoryName/file.jsp". The problem I am having is that tomcat does not seem to use the context paths in server.xml to locate the jsp. I can get this working fine except when the JSP is in a context-path (set in server.xml). The JSP is locatable and works fine if entered manually in the browser (e.g. localhost:8080/directoryName/file.jsp). It also works using forwarding if I move the JSP to the root directory. How can I fix this, if it is something I am doing wrong. I am using Java SDK 1.4.1 and tomcat 4.1.12. All help much appreciated Alan Forster.    More>>

When trying to forward to a JSP from a servlet, I am using a relative path (i.e. "/directoryName/file.jsp".

The problem I am having is that tomcat does not seem to use the context paths in server.xml to locate the jsp.

I can get this working fine except when the JSP is in a context-path (set in server.xml). The JSP is locatable and works fine if entered manually in the browser (e.g. localhost:8080/directoryName/file.jsp). It also works using forwarding if I move the JSP to the root directory.

How can I fix this, if it is something I am doing wrong.

I am using Java SDK 1.4.1 and tomcat 4.1.12.

All help much appreciated

Alan Forster.

   <<Less

Re: server.xml context paths with request forwarding in servlets

Posted By:   Christopher_Koenigsberg  
Posted On:   Friday, March 21, 2003 08:40 AM

Aren't the servlet and the JSP in the same web application context, under the same context-path?

About | Sitemap | Contact