tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Stevenson <dstev...@rochester.rr.com>
Subject Re: Errors in Log file
Date Fri, 03 Dec 2004 00:00:53 GMT
I believe the java.lang.IllegalStateException occurs when the response
is committed. sendRedirect requires changing the HTTP headers (Location:
perhaps). You cannot write HTML to the web page and then issue a
redirect unless the HTML is buffered via a JSP directive:
<%@ page buffer="32kb" %>, and the response can be cleared before it is
flushed (HTTP Headers go before the HTTP body).

Either don't attempt to write HTML to the web page, or make sure your
buffer size is big enough so that the HTML can be buffered and cleared
before you issue the re-direct. The HTML will be ignored when the
sendRedirect is used.

http://java.sun.com/products/jsp/tags/11/syntaxref11.fm7.html
http://www.esus.com/javaindex/j2ee/javajsp/jspbufferautoflush.html

David Stevenson

On Thu, 2004-12-02 at 05:15, Pradeep Chauhan wrote:

> 2. java.lang.IllegalStateException
> 	at
> org.apache.coyote.tomcat4.CoyoteResponseFacade.sendRedirect(CoyoteResponseFa
> cade.java:340)
> 	at org.apache.jsp.DreamScreen_jsp._jspService(DreamScreen_jsp.java:564)
> 	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> 04)
> 	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
> 	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> FilterChain.java:247)
> 	at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> ain.java:193)
> 	at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> va:260)..............
> 
> 
> Thanks and Regards,
> Pradeep Chauhan
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message