Luca,
This question should not be cross-posted to the dev list.
You can accomplish this with a simple javascript command embedded
in the requested page
<script language = "javascript">
location.href="http://www.newlocation.com/address2/";
</script>
-or-
check out the servlet api
( javax.servlet.http.HttpServletResponse.redirect() )
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/servletapi/index.html
which is basically the same thing. These are quick and dirty.
I am not sure that if Tomcat can intercept requests for a resource and
automatically redirect them without executing a page/servlet, maybe
someone else more involved knows.
Regards,
Michael Locasto
----- Original Message -----
From: "Luca Ventura" <[EMAIL PROTECTED]>
To: "tomcat-user" <[EMAIL PROTECTED]>; "tomcat-dev"
<[EMAIL PROTECTED]>
Sent: Wednesday, July 03, 2002 9:28 AM
Subject: How I can redirect requests in Tomcat 4?
> Hello everybody!
>
> I have Tomcat 4 installed as Web Server on a Win 2000 machine. I would
like
> to know how I can redirect requests from an URL to another one. For
example
> I would like to redirect all the requests for this url:
>
> http://www.mydomain.com/address1.html
>
>
> to this new url:
>
> http://www.newdomain.com/address2.html
>
>
> How can I set Tomcat 4 to do this? Which configuration files must I
modify?
>
> Thanks a lot in advance!
>
> Luca
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>