On Wednesday 29 January 2003 07:52 pm, Roman Shpak wrote:
> 30 Январь 2003 01:49, Filip Hanik написал:
> > not really sure what you are asking,
> > but
> > response.sendRedirect(...) in HttpServletResponse
> >
> > will do that
>
> Yes, of course, I know it. But problem is in redirect one url to another
> without any program code in servlet or jsp. Why? It needs for forward all
> request from https://www.... to https://... so if try to do this with  
> response.sendRedirect(...)  catchs warning box. But if using Apache which
> has directive "redirect" in conf file warning box never shows. So has
> Tomcat similar directive?
> Thanks.

Roman,

The HTTP1.1 spec says the client should follow the redirect only if the method 
is GET or HEAD, so check that.

Also, check the status code for the response. Apache 1.3.27 uses HTTP status 
302 with its Redirect directive by default. It's not clear what status Tomcat 
uses for sendRedirect() from the servlet specs, which only say "Sends a 
temporary redirect response to the client using the specified redirect 
location URL".

You can try different 3xx status codes using setStatus() from 
HttpServletResponse.

Paul

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

Reply via email to