tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milo Hyson" <m...@cyberlifeservices.com>
Subject Re: Serious redirect bug
Date Tue, 30 May 2000 03:01:34 GMT
Sorry, I didn't word my message properly. I understand and agree that the
spec is referring to simply terminating the response to the client, not the
actual servlet thread.

Personally I feel it's good practice to put a return after a sendRedirect
call. However I can see where it might be useful to continue with other code
afterwards. For example, one might need to clean up some back-end resources.

----- Original Message -----
From: "Arion" <arion@talentinfo.com.hk>
To: <tomcat-dev@jakarta.apache.org>
Sent: Monday, May 29, 2000 7:51 PM
Subject: Re: Serious redirect bug


> Hi!
>
> Sorry I have missed the following:
>
> "If data is written to the response after these methods are called, the
data is
> ignored."
>
> But it seems making the flow of program difficult to trace if allowing
doing
> something with no-effect.
>
> Arion
>
> Arion wrote:
>
> > Hi!
> >
> > What I got the meaning for the phrase:
> >
> > "No further output to the client should be made by the servlet after
these
> > methods are called."
> >
> > The servlet should not make output to the client, not the servlet engine
not
> > letting the servlet making output to the client.
> >
> > Arion
> >
> > Milo Hyson wrote:
> >
> > > I just installed the Tomcat 3.1 sources. Everything works fine except
for
> > > this one major issue. Redirects (i.e.
HttpServletResponse.sendRedirect())
> > > don't work properly. It appears that after calling this method, the
servlet
> > > doesn't terminate. It keeps on processing subsequent lines of code
resulting
> > > in corrupted responses being sent to clients. However if you put a
return
> > > after the method call, everything works fine.
> > >
> > > I've tried multiple installations on two different machines with the
same
> > > result overtime.
> > >
> > > The Java Servlet Specification 2.2 Section 6.3 states the following:
> > >
> > > "These methods will have the side effect of committing the response,
if it
> > > had not already been
> > > committed, and terminating it. No further output to the client should
be
> > > made by the servlet after
> > > these methods are called. If data is written to the response after
these
> > > methods are called, the data is
> > > ignored."
> > >
> > > If this is not already being handled I hope it gets fixed soon.
> > >
> > > - Milo Hyson
> > > CyberLife Labs
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


Mime
View raw message