permaculture playing cards*
The moose likes Struts and the fly likes Maintaining  the scope of a session login in struts2 web app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Maintaining  the scope of a session login in struts2 web app" Watch "Maintaining  the scope of a session login in struts2 web app" New topic
Author

Maintaining the scope of a session login in struts2 web app

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Hi,

What is the best way to maintain the scope of a session in a struts2 web application.

I mean if a user logs in and after validation say the user can remain idle for 10 mins after which his session will be over or uptill the time he logs out himself.

any special means in STRUTS 2 which helps us to maintain the session or should we control the session variables ourselves using SessionAware??
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

No, sessionAware will give the wrapped map object of session but it couldn't do what you are expecting do it yourself with javascript.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Thanks for the reply Mohan,

Does this mean that Session Handling has to be done entirely by the developer , Is there no interceptor to do the same at all ??
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

No. You can't even write custom interceptor for this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maintaining the scope of a session login in struts2 web app