tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ron Crayton <rjcray...@yahoo.com>
Subject RequestDispatcher.forward() to doc located on HTTP Server
Date Mon, 11 Apr 2005 18:35:55 GMT
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" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger" prefix="LoginApp." suffix=".log"
timestamp="true"/>
</Context>
 
I have this code in my app:
 
ServletContext context = getServletConfig().getServletContext();
String uri = request.getQueryString();
        
ServletContext foreignContext = context.getContext("/");
RequestDispatcher requestDispatcher = foreignContext.getRequestDispatcher(uri);
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! 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message