I have a servlet filter and it checks the session to see if an object exists. If it doesn't, it creates it and saves it to the session and then works with the object. When I make the first request from a browser, it properly says it's null and then lets me set it (and a "getAttribute" check shows it's been set). Then in my browser, I fill out the form that's been returned, submit it and the filter says the session attribute is still null! It then returns to the browser for a redirect and THIS time says it's not null. What's going on?
I'm not sure either. I am calling request.getSession( true ) but that shouldn't be a problem, right? From what I understand it creates a new session only if one doesn't exist and then associates that new one with the request, right?