response.sendRedirect() is sent to the browser after loading is complete,
forward continues execution on the new page directly.


I suppose this is expected behaviour. Why would a code stop executing just
because of a method call? response.sendRedirect(...) whould be something
like Browser.setNextPage(...); and that method call would not cause this
function not to complete.



I'm sorry for sounding like a monday morning programmer who haven't even got
his first cup of coffee yet. Even though it is thursday...

P.S.
Moving the return statement is the only way to stop execution.
D.S.

Johan


----- Original Message -----
From: "Greg Stickley" <[EMAIL PROTECTED]>
To: "Orion-Interest" <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 12:19 AM
Subject: Re: 1.5.1 vs 1.4.7 RequestDispatcher


> I had a problem with request.sendRedirect where orion
> would continue processing the jsp or servlet below the
> sendRedirect.  It's like it ignored the redirect
> intirely.  I had to put a return; statement imediately
> following the sendRedirect statement.  Maybe this is
> related.
>
> --- Kit Cragin <[EMAIL PROTECTED]> wrote:
> > Is there something that changed between 1.5.1 and
> > 1.4.7 that broke my
> > forward() requests?
> >
> > I have a servlet mapped to /start and protected by a
> > role, "user", in
> > web.xml. The servlet obtains a RequestDispatcher to
> > "/roles/user/index.jsp".
> > This JSP has an <iframe> that loads
> > "/roles/user/content.html".
> >
> > Under 1.4.7 when I do http://localhost/webapp/start
> > I got a login prompt as
> > expected and everything shows up correctly. Under
> > 1.5.1, the same URL causes
> > 3 login prompts. On the last one, I get a 401
> > unauthorized on content.html.
> > Anyone know why this could be occuring?
> >
> > Thanks,
> >
> > Kit Cragin
> > VP of Product Development
> > Mongoose Technology, Inc.
> > www.mongoosetech.com
> >
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/


Reply via email to