aspose file tools*
The moose likes Struts and the fly likes Struts 2 session management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 session management" Watch "Struts 2 session management" New topic
Author

Struts 2 session management

Dheeraj Singh Thakur
Greenhorn

Joined: Jun 18, 2012
Posts: 4

HI,

I am developing a site in which i have to implement session listener.
As i have HttpSessonListener for this but i want to know is there any equivalent struts 2 api for this.

Thanks in advance
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8866
    
    8

HttpSessonListener is in the JEE API, not Struts (1 or 2).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Dheeraj Singh Thakur
Greenhorn

Joined: Jun 18, 2012
Posts: 4

This is my question. We have HttpSessionListener in JEE...Do we have anything like this for struts.??
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Dheeraj Singh Thakur wrote:This is my question. We have HttpSessionListener in JEE...Do we have anything like this for struts.??

Why would struts have the same functionality again? Struts is not a replacement of JEE APIs. Is there a reason why you don't want to implement the JEE HttpSessionListener?
Dheeraj Singh Thakur
Greenhorn

Joined: Jun 18, 2012
Posts: 4

Iam using SessionAware for session management and i want to configure HttpSessionListener but its not working with SessionAware means sessionCreated method is not called when new session object is being created using SessionAware.
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 892
    
    9
Dheeraj Singh Thakur wrote:Iam using SessionAware for session management and i want to configure HttpSessionListener but its not working with SessionAware means sessionCreated method is not called when new session object is being created using SessionAware.


SessionAware does not create new sessions. If you want to listen for session attribute changes then you must implement HttpSessionAttributeListener. HttpSessionListener.sessionCreated is only fired once when the user session is created.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 session management