I've tried two different re-orderings of the filters but we are still seeing the "java.lang.IllegalStateException: Cannot create a session after the response has been committed" error.
Other suggestions? -Michael On Tue, Oct 8, 2013 at 4:52 PM, Marvin S. Addison <[email protected]>wrote: > I guess I'm confused because I thought the response would not start >> until all filters in the chain were processed. What am I missing here? >> > > I don't think there is any such guarantee in the servlet specification. > > > In my web.xml this is the last filter I have defined which may explain >> the issue if others can cause the filter chain to end early. >> > > You should probably define it near the top to reduce the likelihood of the > response starting before you add cookies. I should note that the order of > <filter-mapping> elements controls order of filter invocation, not the > order of <filter> elements. > > > Is this simply an ordering problem or do I have some something >> fundamental wrong? >> > > Probably the former. Try moving to the top of filter execution chain and > see if that resolves. > > Here is the filter code: >> public void doFilter( >> ... >> response.addCookie(c); >> ... >> > > I see you're attempting to add cookies as I suspected, so that's a good > sign my hunch about the root cause is correct. Do the cookie manipulation > before the response starts and you should be good. > > > M > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/**display/JSG/cas-user<http://www.ja-sig.org/wiki/display/JSG/cas-user> > -- Michael Herring Information Technology Services Web Developer Denison University 740-587-6360 [email protected] -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
