I'm too lazy to use bugzilla on this:

What in the standard makes anyone here think processing of the JSP/Servlet
terminates once a HttpServletResponse.sendRedirect() is encountered? 

This is a common fallacy of people moving from ASP.

YOU ALWAYS NEED A RETURN STATEMENT IMMEDIATELY FOLLOWING A
sendRedirect()!!!!!!

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
  

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 23, 2004 9:52 AM
> To: tomcat-dev@jakarta.apache.org
> Subject: DO NOT REPLY [Bug 32811] - sendRedirect does not commit
> 
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG.
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://issues.apache.org/bugzilla/show_bug.cgi?id=32811>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND.
> INSERTED IN THE BUG DATABASE.
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=32811
> 
> 
> 
> 
> 
> ------- Additional Comments From [EMAIL PROTECTED]  
> 2004-12-23 17:51 -------
> I'm surprised that page compiles in Jetty.
> Doesn't it use the Jasper compiler as well?
> 
> AFAIK, sendRedirect and throw statements always need to be 
> contained in a branch if there is any code after them.
> 
> I would, however, expect this page to return a redirect instead of 
> a server error.  I tested with 5.0.30 and it compiled but 
> returned a server 500
> error.
> 
> <%                                                            
>                  
>                 
> if(request.getParameter("test") == null){
>     response.sendRedirect("/index.jsp");
> }                                                             
>                  
>                
> if(request.getParameter("test") == null){
>     throw new Exception("Can't Redirect");
> }                                                             
>                  
>              
> %>
> 
> 
> -- 
> Configure bugmail: 
> http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to