I know you mentioned that you can't use apache, but this looks like a
perfect use for Apache mod re-write.  This is how I would handle it.
In response to your question.   Yes, one way that this can be done is
with a web application running in tomcat.   For example a Servlet or jsp
can do a redirect or a forward of the request.

ED

-----Original Message-----
From: Ryan Clark [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 13, 2006 10:35 AM
To: users@tomcat.apache.org
Subject: Example Balancer Rules and Information

Hi, I have deployed tomcat 5.0.28 (it has to be this version) and I need
to configure it to redirect URLs sent to the ROOT to one of several
webapps. I am using the balancer app as the ROOT application and I have
been able to get the basic configuration working. (http://host1
redirects to http://host1/webapp1 and http://host2 redirects to
http://host2/webapp2) 
 
What I am looking for is to redirect urls such as
http://hostname/dir/dir2 to http://hostname/webapp/dir/dir2 where dir2
is actually a variable which appears in the url as a directory and is
handled by the webapp, so it cannot be hardcoded into the redirect. I
have done some searching and I cannot find many examples of the rules
that can be used for the standard balancer other than the 3 examples
that come in the rules.xml. 
 
Is what I am trying possible? I cannot use Apache in front of Tomcat as
this causes further problems with the webapp. I would prefer not to do
this via JSP if possible.
 
thanks
Ryan Clark
Senior Technical Consultant
Perspicuity Ltd
[EMAIL PROTECTED]
 
This message and any attachments are confidential and should only
be read by those to whom they are addressed. If you are not the
intended recipient, please contact us, delete the message from your
computer and destroy any copies. Any distribution or copying without
our prior permission is prohibited.

Internet communications are not always secure and therefore
PERSPICUITY LIMITED does not accept legal responsibility for this
message or the content.

The recipient is responsible for verifying its authenticity before
acting on the contents. Any views or opinions presented are solely
those of the author and do not necessarily represent those of
PERSPICUITY LIMITED.

PERSPICUITY LIMITED UK, 2 Place Farm, Wheathampstead, Herts. AL4 8SB.
Registered in England & Wales No. 4365513

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to