tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Grant <Jan.Gr...@bristol.ac.uk>
Subject RE: welcome files being forwarded to rather than redirected to?
Date Thu, 04 Oct 2001 10:25:02 GMT
On Thu, 4 Oct 2001, Colin Wilson-Salt wrote:

> Surely the way to fix this is that a request for http://foo.bar/webapp
> generates a redirect to http://foo.bar/webapp/, and a request to
> http://foo.bar/webapp/ will serve the default content using forward() or
> some equivalent.

Yep, reckon so. I've no problem with blah.../dirname generating a
redirect to blah.../dirname/ - it's the forwarding I'm interested in.

>
> > -----Original Message-----
> > From: Jan Grant [mailto:Jan.Grant@bristol.ac.uk]
> > Sent: Thursday, October 04, 2001 10:06
> > To: tomcat-dev
> > Subject: Re: welcome files being forwarded to rather than
> > redirected to?
> >
> >
> > On Wed, 3 Oct 2001, Craig R. McClanahan wrote:
> >
> > > It's not at all clear that the "Persistent URI" article you
> > referenced has
> > > anything to do with whether a redirect is used for a
> > welcome file or not
> >
> > actually, I was more concerned with exposing implementation mechanisms
> > in URIs; and future-proofing so that when index.jsp becomes
> > index.csharpsp in the future (only kidding...) I'm not left with an
> > unmanageable mess.
> >
> > > Originally (back in the pre-3.2-final days), Tomcat did the
> > equivalent of
> > > a RequestDispatcher.forward() to display welcome pages.  This caused
> > > massive problems for people who didn't understand the
> > difference between:
> > >
> > >   http://foo.bar/webapp
> > >
> > > and
> > >
> > >   http://foo.bar/webapp/
> > >
> > > In the former case, any relative urls on the "real" welcome page are
> > > broken.  This caused bug reports about welcome files not
> > working (never
> > > mind that using a <base> element in your welcome page would
> > have fixed
> > > it), which led to the current behavior.
> >
> > Assuming I want this behaviour and I know the difference, is there a
> > preferred mechanism to replace this line in DefaultServlet.java?
> >
> >
> >                 redirectPath = appendParameters(request,
> > redirectPath);
> > --              response.sendRedirect(redirectPath);
> >                 return;
> >
> > Cheers,
> > jan
> >
> > --
> > jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
> > Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822
> > jan.grant@bris.ac.uk
> > Talk is cheap: free, as in beer. As in Real Ale, not that
> > Budweiser rubbish.
> >
>
>

-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 RFC822 jan.grant@bris.ac.uk
You see what happens when you have fun with a stranger in the Alps?


Mime
View raw message