users@jersey.java.net

Re: [Jersey] JSESSION cookie not returned with Spring-Jersey integration

From: Peter Coppens <pc.subscriptions_at_gmail.com>
Date: Fri, 8 May 2009 13:23:22 -0700 (PDT)

Well...I stepped through the both the working and the failing case.

What seems to happen is that there is a spring security filter
(HttpSessionContextIntegrationFilter) which attempts to create a session
after the resource has been invoked. When the (Jersey) resource returns a
response that fails with an exception

  java.lang.IllegalStateException: Cannot create a session after the
response has been committed

which is - I think - the cause that the JSESSION cookie is not returned.

Not sure why Jersey is committing the response. It does look like that makes
it difficult for filters higher up the chain to do much useful stuff with
the returned response.

Anyone any thoughts?

Thanks,

Peter
-- 
View this message in context: http://n2.nabble.com/JSESSION-cookie-not-returned-with-Spring-Jersey-integration-tp2845573p2847362.html
Sent from the Jersey mailing list archive at Nabble.com.