In processing the filter chain in a class that implements the Filter interface, the request parameter has a null session and nulled out parameters. This only happens after the first use of the filter. The first time the filter is executed the session is populated and everything works.
I don't understand what your problem is. Please submit a ready to test war.
The linked war file (http://www.vincebloise.info/bfg.war) contains the source as well as class files. Please run the application and notice how the Filter implementation request has a null session when filtering from the main.jsp page. The application asks for a user id and password, but it will take anything in these fields.
I cannot access your test case. Please attach it to the bug report (it's quite easy to do).
I got the "test case" (which is an anything but minimal JSF-Struts webapp :( ; this is not a user support forum, and we don't do find-whatever-is-wrong-in-your-webapp work), and I still do not understand what the problem could be. Please state clearly what the problem is. Overall, I doubt there's a bug with session handling.
(In reply to comment #4) > I got the "test case" (which is an anything but minimal JSF-Struts webapp :( ; > this is not a user support forum, and we don't do > find-whatever-is-wrong-in-your-webapp work), and I still do not understand what > the problem could be. Please state clearly what the problem is. > Overall, I doubt there's a bug with session handling. (In reply) The problem: An object is placed in the session scope via HttpSession = request.getSession() session.setAttribute(...) in a servlet. That servlet then forwards the request to a JSP page in a directory that is monitored by a filter servlet. The filter servlet attempts to retrieve the session attribute from the request via session.getSessionAttribute(...) and finds that the request's session has all its attributes set to null.
Then, this works for me. Please do not reopen the report.
i have also tried this out for you. i wrote 1 basic servlet that acquired the session and added a String attribute, 1 basic filter that attempted to acquire that attribute from the session, and 1 jsp that was forwarded to using a RequestDispatcher from the basic servlet after the session attribute was added. this was configured in web.xml with a filter-mapping using a url-pattern for the location of the jsp, i.e /tests/33058.jsp. the jsp also tries to output the session attribute. test 1 revealed that the filter is not even touched when the basic servlet is requested. the jsp is arrived at however, and does output the correct session attribute. i consulted the servlet 2.4 specification and found that in 2.4 you add an element called "dispatcher" to the filter-mapping so that RequestDispatchers work with the url-pattern (section 6.2.5) i change the filter-mapping to <filter-mapping> <filter-name>Basic Filter</filter-name> <url-pattern>/views/test/*</url-pattern> <dispatcher>FORWARD</dispatcher> </filter-mapping> running this test reveals that the filter _can_ access the session value: String myAttribute = (String) ((HttpServletRequest) request). getSession().getAttribute("myAttribute"); hope this helps.