Possible to forward a request to another server?

2004-05-27 Thread Wendell Holmes
Is it possible to forward a request from one Tomcat server to another? I looked at the API's and it seems to say the resource must be located on the same server and in the same servlet context. I'm needing to have some way to forward http requests from an external IIS web server to an internal

RE: Possible to forward a request to another server?

2004-05-27 Thread Shapira, Yoav
Hi, Like HttpServletResponse#sendRedirect? It's not like a forward in that the client URL changes, but it does pass the request to another server. Beyond that, you COULD write something that'd wrap the request, invoke another server to handle it, and stream the response to your own client. Yoav

RE: Possible to forward a request to another server?

2004-05-27 Thread Wendell Holmes
Thanks, Yoav. I will try to write something to wrap the request. The streaming back part answers my question about how to handle the response. I could simply use IIS to redirect the original request, but the server address would be unreachable for the client as only the web server would have a

Re: Possible to forward a request to another server?

2004-05-27 Thread Tim Funk
Look at JSTL's c:import tag. If you don't do posts (or images) - it might be enough of a quick kludge. For example, call this page cowbell.jsp: -- %@ taglib uri=http://java.sun.com/jstl/core/c.tld; prefix=c % c:import url=http://otherserver${pageContext.request.requestURI}/ -- Then in web.xml:

RE: Possible to forward a request to another server?

2004-05-27 Thread None None
In simplest terms, a response forward sends control to something in the same context and the forwarded, a response rediect can go to something outside the context. The technical difference is that a forward is done entirely on the server, wheras a redirect sends the redirect command to the

Re: Possible to forward a request to another server?

2004-05-27 Thread David Crooke
You may want to look at plugging it in using an AJP connector, which is a webserver plugin which talks to your Tomcat JVM across TCP/IP using a proprietary protocol. I've only done this with Apache, but they apparently exist for IIS and iPlanet too.