I'd be happy to provide an example, but my application has a lot pages and classes. I'll see if I can strip out a simple version of it later on. Basically, the STATE_SAVING_METHOD is the only trigger here to turn on and off the exception below. One thing I forget to mention is that I'm using tiles, and the exception I'm getting is when accessing the very first login page. When I stepped into the code, the place where the exception is thrown is within in the code block of trying to save the state using the "server" state.

----- Original Message ----- From: "Bill Dudney (JIRA)" <myfaces-dev@incubator.apache.org>
To: <[EMAIL PROTECTED]>
Sent: Sunday, October 02, 2005 11:19 PM
Subject: [jira] Commented: (MYFACES-610) Getting IllegalStateException exception when setting javax.faces.STATE_SAVING_METHOD to "server"


[ http://issues.apache.org/jira/browse/MYFACES-610?page=comments#action_12331131 ]

Bill Dudney commented on MYFACES-610:
-------------------------------------

Sorry but I was running on the 1.1.1 branch. We will hopefully have a release out shortly (in a week or so) that should fix this issue. Although an example would still be helpful so we could add a cactus test that makes sure we don't reintroduce the problem.

Getting IllegalStateException exception when setting javax.faces.STATE_SAVING_METHOD to "server"
------------------------------------------------------------------------------------------------

         Key: MYFACES-610
         URL: http://issues.apache.org/jira/browse/MYFACES-610
     Project: MyFaces
        Type: Bug
  Components: General
    Versions: 1.1.0
 Environment: Tomcat 5.5.9 on Windows XP.
    Reporter: Saul Q Yuan


I have an application that works on 1.0.9 but stopped working when upgraded to 1.1.0. I got a blank screen. And console shows the following error:
java.lang.IllegalStateException: Cannot create a session after the
response
has been committed
 at
org.apache.catalina.connector.Request.doGetSession(Request.java:2195)
 at
org.apache.catalina.connector.Request.getSession(Request.java:2017)
 at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:822)
 at
org.apache.myfaces.context.servlet.SessionMap.setAttribute(SessionMap.java:50)
 at
org.apache.myfaces.context.servlet.AbstractAttributeMap.put(AbstractAttributeMap.java:104)
 at
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedViewInServletSession(JspStateManagerImpl.java:321)
 at
org.apache.myfaces.application.jsp.JspStateManagerImpl.saveSerializedView(JspStateManagerImpl.java:228)
 at
org.apache.myfaces.taglib.core.ViewTag.doEndTag(ViewTag.java:122)
 at
org.apache.jsp.common.headerBodyFooterLayout_jsp._jspx_meth_f_view_0
....
After a few days tweaking & debugging, I changed the value of the following setting in my web.xml:
javax.faces.STATE_SAVING_METHOD
from "server" to "client",
Now, my app works again.
I think this is a bug.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
  http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira

Reply via email to