tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Simpson <es...@home.com>
Subject Re: Tomcat 3.1 + HTTPS + redirects
Date Fri, 04 Aug 2000 16:57:31 GMT
Jason Rumney wrote:

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

jason,

I'm not sure what web server your using, but by setting my ServerName
directive in apache to my external dns name I'm able to use redirects
such as response.sendRedirect("error.html")

Eric Simpson


Mime
View raw message