<% if ( situation.isDEFCON_ONE() ) { %>
<ora:redirect url="starwars.jsp" >
<%
return; // DID YOU RETURN FROM THE ``getService'' method?!
%>
--
Peter Pilgrim
G.O.A.T
"the Greatest Of All Time"
---------------------------------------- Message History
----------------------------------------
From: Tim Keuning <[EMAIL PROTECTED]>@java.sun.com> on 19/02/2001 11:17 EST
--<CUT>--
I am working with creating a report online. There are two JSP pages: the
parameters.jsp (a form for inputting report dates, etc.), and report.jsp
(which queries the database shows the report). There is also a custom tag
involved. This tag exists on the parameters page, handles validation of the
report parameters, and, once validated, uses response.sendRedirect() to move
the user to the report page.
When working with just the two JSP pages and the tag, everything works fine.
After the form is valid, the redirect gets sent, and the report shows. All is
happy and good.
Almost.
The problem arises when I attempt to enforce style, security, etc. using a
servlet as a controller which includes pages programmatically. The servlet
logic looks like this:
include page header
include parameter form
include page footer
When accessed this way, the sendRedirect() method in the tag in parameters.jsp
does not work. I get no "IllegalStateException", as I ought if the response
was already commited. I get no "IOException". The redirect just never
happens. If I skip the servlet and go directly to the JSP pages, all works
again.
--<CUT>-=
--
This e-mail may contain confidential and/or privileged information. If you are not the
intended recipient (or have received this e-mail in error) please notify the sender
immediately and destroy this e-mail. Any unauthorised copying, disclosure or
distribution of the material in this e-mail is strictly forbidden.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets