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-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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to