tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghupathy,Gurumoorthy" <>
Subject RE: RequestDispatcher.forward() to doc located on HTTP Server
Date Tue, 12 Apr 2005 07:30:21 GMT
Forward only works within a context 

-----Original Message-----
From: Ron Crayton [] 
Sent: 11 April 2005 19:36
Subject: RequestDispatcher.forward() to doc located on HTTP Server

Is it possible to use Request.forward() to forward a request to an html
document located on an HTTP Server?
I'm using Tomcat 5.5.7 and Apache 2.0.
I have a document setting in the htdocs folder of Apache 2.0 that I'm trying
to forward to from an application deployed in Tomcat 5.5.7.
I have this context in my server.xml file:
<Context path="/LoginApp" docBase="LoginApp" debug="0" reloadable="true"
<Logger className="org.apache.catalina.logger.FileLogger" prefix="LoginApp."
suffix=".log" timestamp="true"/>
I have this code in my app:
ServletContext context = getServletConfig().getServletContext();
String uri = request.getQueryString();
ServletContext foreignContext = context.getContext("/");
RequestDispatcher requestDispatcher =
requestDispatcher.forward(request, response);
The uri comes from the query string of the original request.
When the code runs it says that the requested resource is not available -
Error 404.
Am I trying to do something that's impossible?
Please help.

Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 

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

View raw message