• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 2 session management

 
Greenhorn
Posts: 4
Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HttpSessonListener is in the JEE API, not Struts (1 or 2).
 
Dheeraj Singh Thakur
Greenhorn
Posts: 4
Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my question. We have HttpSessionListener in JEE...Do we have anything like this for struts.??
 
Rancher
Posts: 989
9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 4
Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 989
9
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic