wouldn't a simple

**********
if(!flag)
{
    %>
    <script language = 'javascript'>
        location.replace("newjsppage.jsp");
    </script>
    <%
}
**********

all the System.out.println should show up in the window that launches
tomcat.

im not sure if this is what you're after?

----- Original Message -----
From: "Edward King" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 06, 2004 9:13 AM
Subject: How to redirect JSP page?


> I want to redirect one JSP to another JSP,like follows:
> /* one JSP */
> ....
> boolean flag;
> System.out.println("some information");
> ....
> //Then I call JavaBean and return true or false,if return false,then
redirect Fail.jsp page
> flag=bean.somemethod();
> if(flag==false){
> %>
>           <jsp:forward page="Fail.jsp" />
> <%
> }
> ....
>
>
> When I run it,it raise following error:
> java.io.IOException: Error: Attempt to clear a buffer that's already been
flushed
>
> I know before redirect another JSP,there shouldn't be any output,but I
really need some output,like System.out.println() to display debug
information.
> In this situation,how to redirect another JSP page?
>
> Any idea will be appreciated!
> Edward
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to