tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32811] - sendRedirect does not commit
Date Mon, 27 Dec 2004 17:40:30 GMT
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 wpoziombka@budweiser.com  2004-12-27 18:40 -------
(In reply to comment #1)
> 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");
> }                                                                              
>              
> %>
> 

I paraphrased the page for clarity.  Most concise would look something like:
<%
response.sendRedirect("/index.jsp"):
if (true) throw new javax.servlet.ServletException("redirected");
%>


-- 
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: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message