On 1/29/07, Tom Schneider <[EMAIL PROTECTED]> wrote:
Does this http://jira.opensymphony.com/browse/WW-291 have anything to do with this?
I don't think so, although I'm just reading that ticket for the first time and haven't encountered this bug. In short, it looks like the DebuggingInterceptor always assumes that a session exists, when in Bob's case, the session has not been created. The easy work around would be to disable the debugging -- turn off devMode, don't pass the debug param with a value of "console", or define an interceptor stack for your actions that doesn't use the DebuggingInterceptor. I'm not sure that the Struts2/Webwork API provides a clean conceptual way to know that it's not safe to write to the session, and I'm not sure what the DebuggingInterceptor is trying to do in putting something in the session. (It looks like that operation has moved to line 210 in SVN Head -- at least, there's only one call to SessionMap.put that I can find. (ll 208-211: if (devMode && consoleEnabled) { final ActionContext ctx = ActionContext.getContext(); ctx.getSession().put(SESSION_KEY, ctx.get( ActionContext.VALUE_STACK)); } ) As you said, it will appear to work because this is happening probably after everything else has already been invoked. I haven't spent much time with the debug facilities, so I can't offer much more of a suggestion as to how this should be fixed, but it probably deserves to be filed as a bug. Joe
java.lang.IllegalStateException: Cannot create a session after the > response has been committed > at org.apache.catalina.connector.Request.doGetSession( Request.java > :2214) > at org.apache.catalina.connector.Request.getSession(Request.java > :2024) > at org.apache.catalina.connector.RequestFacade.getSession( > RequestFacade.java:831) > at javax.servlet.http.HttpServletRequestWrapper.getSession( > HttpServletRequestWrapper.java:215) > at org.apache.struts2.dispatcher.SessionMap.put(SessionMap.java > :172) > at > org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept( > DebuggingInterceptor.java:178)
-- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso