[S2] Newbie question about HTTP Sessions

2007-03-08 Thread Roger Varley
Hi A couple of newbie questions. Firstly, does Struts2 automatically create an HTTP Session or do I need to explicitly create it. Early experimentation suggests that it's automatically created as I'm seeing the JSESSIONID parameter in the Urls generated without doing anything, but I'd like to be

Re: [S2] Newbie question about HTTP Sessions

2007-03-08 Thread Piero Sartini
Hello. A couple of newbie questions. Firstly, does Struts2 automatically create an HTTP Session or do I need to explicitly create it. Sessions are managed by the servlet-container. Struts does not need to create them. Early experimentation suggests that it's automatically created as I'm

Re: [S2] Newbie question about HTTP Sessions

2007-03-08 Thread Piero Sartini
Secondly I need to know when a session is ended. Is there an established Struts 2 practice for this or do I still create an HTTPSessionListener object and register it in web.xml as I would with a basic web-app. HTTPSessionListener? You can use --- code --- session-config

Re: [S2] Newbie question about HTTP Sessions

2007-03-08 Thread Roger Varley
Yes - you are right. The sessions are generated automatically by the container (tomcat, etc). Thanks. In a servlet based web-app I would create the session object programatticaly with httpServletRequest.getSession(true). I just wasn't sure if Struts 2 was creating the session for me since I