Ok,
sorry for the cross-posting...:-)

Anyway I need to know how to implemenent the second solution you said,
that is to say I want that  Tomcat intercepts the requests for a resource
and
automatically redirects them without executing a page/servlet.

If someone knows how to configure Tomcat to do this I pray him
to let me know...thanks!

   Luca

-----Messaggio originale-----
Da: Michael Locasto [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 3 luglio 2002 16.23
A: Tomcat Developers List
Cc: Luca Ventura
Oggetto: Re: How I can redirect requests in Tomcat 4?


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]>


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

Reply via email to