tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Rumney <jrum...@att.com>
Subject Re: Tomcat 3.1 + HTTPS + redirects
Date Fri, 04 Aug 2000 16:06:02 GMT
Eric Simpson <esimp@home.com> writes:

> I'm assuming its redirecting you to the internal web server
> name instead of the external name right?
> 
> I got around this by using this redirect code.
> 
> response.sendRedirect(request.getScheme() + "://" + reqeust.getServerName()
> + ":" + request.getServerPort());
> 
> and it makes the code a lot more portable also. Hope this
> helps.

Thanks,


it seems response.sendRedirect(request.getScheme() + ":" + encoded_url);
is sufficient to take care of my problem (although possibly dependent on
implementation of sendRedirect). I prefer to use relative URLs if
possible rather than try to coerce them into full URLs, and let Tomcat
take care of the path, server name, server port etc.



-- 
Jason Rumney <jrumney@att.com>
AT&T Labs (Redditch, UK)


Mime
View raw message