You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Quenten Van Egeren <qv...@yahoo.com> on 2000/12/07 16:14:15 UTC

RE: Is their a bug in Tomcat with the RequestDispatcher.forward(u rl) method?

Thanks for the replies, I knew that the forward did an
internal redirect, I was just confused as to why
Weblogic was doing it one way and Tomcat another.

So the next question is : 
what is the easiest way to do  something like a
response.sendRedirect() and still keep the request
object intact?

Thanks,

Quenten
--- "MacLaren, Donald" <DM...@cmgi.com> wrote:
> That's how it works
> 
> 
> -----Original Message-----
> From: David Rees [mailto:drees@ebetinc.com]
> Sent: Wednesday, December 06, 2000 5:13 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Is their a bug in Tomcat with the
> RequestDispatcher.forward(url) method?
> 
> 
> A forward is an internal redirect, the client never
> sees it (and therefore
> never updates the URL in the status bar of the
> browser).
> 
> Tomcat is working properly, and it sounds like
> Weblogic is doing a redirect
> and is broken.
> 
> -Dave
> 
> > -----Original Message-----
> > From: Quenten Van Egeren
> [mailto:qvanegeren@yahoo.com]
> > Sent: Wednesday, December 06, 2000 1:18 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Is their a bug in Tomcat with the
> > RequestDispatcher.forward(url) method?
> >
> >
> > I am using the following code snippet in one of my
> > servlets :
> >
> >       RequestDispatcher dispatcher =
> > request.getRequestDispatcher(url);
> >       dispatcher.forward(request, response);
> >
> > When I do this type of thing under Weblogic 5.1,
> the
> > url page is displayed and the url in the
> "Location"
> > box on the browser is changed to this url (this is
> > working correctly)
> >
> > When I do this under Apache/Tomcat the url page
> > displays correctly, but the url in the Location
> box is
> > the url of the previous page...
> >
> > Is there something special that I need to setup in
> one
> > of the Tomcat config files, or is this a bug?
> >
> > Any help would be greatly appreciated.
> >
> > Thanks in advance,
> >
> > Quenten Van Egeren
> > (qvanegeren@yahoo.com)
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Shopping - Thousands of Stores. Millions of
> Products.
> > http://shopping.yahoo.com/


__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Re: Is their a bug in Tomcat with the RequestDispatcher.forward(u rl) method?

Posted by Kurt Bernhard Pruenner <le...@gmx.at>.
Quenten Van Egeren wrote:
> Thanks for the replies, I knew that the forward did an
> internal redirect, I was just confused as to why
> Weblogic was doing it one way and Tomcat another.
> 
> So the next question is :
> what is the easiest way to do  something like a
> response.sendRedirect() and still keep the request
> object intact?

Frankly, there isn't - response.sendRedirect instructs the browser to start a
new request and get a different page, so it works as if you were opening a new
browser window and loading that page; only session objects will live long
enough to get to that new page intact...

-- 
Kurt Bernhard Pruenner --- Haendelstrasse 17 --- 4020 Linz --- Austria
Music: http://www.mp3.com/Leak --- Work: http://www.ssw.uni-linz.ac.at
.......It might be written "Mindfuck", but it's spelt "L-A-I-N".......
np: Boards Of Canada - XYZ (Peel Session broadcast)