Hm... interesting! Thanks for the info. One thing I did not understand yet: Shouldn't this cause trouble in any case, not just in certain company networks?
-will On 19.05.2011, at 10:27, Unger, Richard wrote: > Hi Will! > > „Response already committed“ means the response has started to send, i.e. > headers have already been written to the socket, so you can’t create a > session anymore (no way to send session-cookie, headers are done). > > We got this error after upgrading to 4.2 in a similar situation, trying to > use the session from within a template model. > > I seem to remember we solved it by changing the way the templates worked, > using AJAX to call the template with the execute method rather than letting > it get called in the normal course of page rendering. This somehow made the > error go away, presumably because the session was now created earlier, before > any content was written. > Also, we used: > MgnlContext.setAttribute(“name”, “value”, > Context.SESSION_SCOPE); > Rather than using the session directly. > > Maybe that helps? > > Regards from Vienna, > > Richard > > > Von: [email protected] > [mailto:[email protected]] Im Auftrag von Will Scheidegger > Gesendet: Mittwoch, 18. Mai 2011 17:12 > An: Magnolia User-List > Betreff: [magnolia-user] Trouble with Session in company networks > > Dear Magnolians > > We're experiencing problems with a Magnolia Website which requires a Session. > If the site is accessed from certain company networks we get the following > exception: > > 2011-05-18 15:44:53,845 ERROR info.magnolia.cms.taglibs.Include > : Cannot create a session after the response has been committed > java.lang.IllegalStateException: Cannot create a session after the response > has been committed > at > org.apache.catalina.connector.Request.doGetSession(Request.java:2377) > at > org.apache.catalina.connector.Request.getSession(Request.java:2097) > at > org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833) > at > ch.fastforward.magnolia.module.schweizmobilcard.rendermodels.InitialMembershipModel.execute(InitialMembershipModel.java:66) > .... > > The last line listed above does the following: > > HttpSession s = > MgnlContext.getWebContext().getRequest().getSession(true); > > I've seen the "Cannot create a session after the response has been committed" > many times before, but was never able (or did never take the time) to track > this one down properly, because it never caused any problems (or we never > heard of any problems). However in this case this really causes trouble since > the employees of one of the biggest company in the country cannot place > orders. > > My guess would be that the browser settings in this company block session > cookies... but the error message does not really match this assumption. Does > anyone have an idea how to resolve this one? > > Thanks! > > -will > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
