--- Ritchie Gillam <[EMAIL PROTECTED]> wrote:

> I am trying to have all requests that come to the
> Tomcat Server be redirected to another web server. 
> What is the best/easiest was to do this?
> 
> I have Tomcat 5.5.7 installed and I do not have or
> want to install Apache.
> 
> I have did a search through the archives and have
> found nothing.
> 
> Any suggestions?
> 
> Thanks in advance,
> 
> Tomcat 5.5.7
> Sun Solaris 9
> 
> Ritchie 

Depending on whether you really want to redirect or
perform proxying you have to do different things.  

1) A simple redirect.  You can send a redirect and
just make all requests go to your servlet using the
default web application web.xml file to map all
requests to go to a servlet.  Must be the default web
app/context.

2) Http pass through proxy like mod_proxy that Apache
can use.  You will need to create a Filter and install
it into your "default web application" for the given
Host or Server, or you could also use a Servlet for
this and have all requests come through that servlet
(default web app as well).  Regardless you'll have to
get your ServletRequest as an HttpServletRequest
package it all back up and then use an HttpClient
instance to proxy the request through to another
server and filter back through your single end point. 
This makes your requests go to be processed by
different systems, yet they come through one from end.
 Nothing but simple pass through. 

Someone else might know of some project which is
already doing this.  It would be nice if you could
find one that would watch a properties or xml file
with the proxy information sort of like the Apache
conf file will have for mod_proxy and then reload it
and the new rules when the file changed.

Wade

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to