dear all
 i have a problem about jsp. follow is my code:
##############################################
//there are some other lines ,but haven't using the "Out" object.
   if (flag) {
      out.println("ok");
       response.sendRedirect("club/register_club_success.htm");
   }else{
       response.sendRedirect("/club/register_club_error.htm");
   }

######################################################

But sometimes it doesn't work ! my tomcat server issue  some errors:


#####################################
Internal Servlet Error:

java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already 
been obtained
        at 
org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:130)
        at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:357)
        at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:381)
        at 
jsp._0002fjsp_0002fsave_0005fprofile_0002ejspsave_0005fprofile_jsp_6._jspService(_0002fjsp_0002fsave_0005fprofile_0002ejspsave_0005fprofile_jsp_6.java,
 Compiled Code)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java, Compiled 
Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
        at 
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, 
Compiled Code)
        at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java, 
Compiled Code)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java, Compiled Code)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code)
        at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java, 
Compiled Code)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled 
Code)
        at 
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
 Compiled Code)
        at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java, 
Compiled Code)
        at java.lang.Thread.run(Thread.java, Compiled Code)
##########################################################

Can anybody help me? thanks in advance!





            ahfei
            [EMAIL PROTECTED]

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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

Reply via email to