0 Replies Latest reply on Nov 2, 2007 8:41 AM by Nikola Zivkov

    Session objects in Valves

    Nikola Zivkov Newbie

      I need to create a custom access log valve similar to the FastCommonAccessLogValve which I guess is the default one used in Tomcat. The difference is that I want to output to more than one different log files depending on the value of a session object.

      The application for which the Valve will be used is actually a JBoss Portal. The problem I'm having is that the session object which I need is missing in each request for a JBoss Portal page but it exists for each subsequent request that follows such as the requests for the page images, css and JavaScript files.

      E.g. When the following request: http://localhost:8080/portal/portal/default/main is processed in the Valve, the session object is missing but immediately after that when http://localhost:8080/images/139.gif or any other request follows, the object is there. The session id is the same in all requests but the session object differs. It's one for the first request (the one for the page) and another for all subsequent requests (the ones for the page images and css).