On Tue, 13 Aug 2002, Ashish Kulkarni wrote:

> Date: Tue, 13 Aug 2002 10:25:27 -0700 (PDT)
> From: Ashish Kulkarni <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: tomcat4.0.4 and Servlet Specification 2.3 and JSp1.2
>
> Does tomcat4.0.4 follow servlet specifications 2.3 and
> jsp 1.2

Yes.

> if yes then can some one explain the following
> as per these specification
>  <jsp:include page="common.jsp" flush="true" />
>  <% if (someCondition) { %>
>    <jsp:forward page="another.jsp" />
>  <% } %>
>
>  the above code will give error, but if u make the
>  flush value="false", it must work, and not give
>  error.???
>  but when i tried it in jsp it gives my illleagal
>  state
>  error, saying cannot forward after sumbitting
>  response.
>  Ashish
>

As the servlet spec will tell you, it is not legal to do a
RequestDispatcher.forward() -- which is what <jsp:forward> does under the
covers -- after the response has been committed.  Using flush="true" on
your include causes the response to be committed.

Craig


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

Reply via email to