• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session checking in struts2

 
saravanan Senthil
Greenhorn
Posts: 11
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am new to sturts2 framework and I am doing application with session (SessionAware). I need to check whether session is exist or not whenever any action is invoked from struts.xml and if session is not available then I need redirect to login page.These check should be in in struts.xml or web.xml.please help me.thanks in advance!.
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's two ways to do this: first, you can use the JEE Standard, where you declare what resources you want to secure and the container enforces it, or you can examine the session yourself and handle the security actions in your code.
I prefer the JEE option, as I want to reinvent, write, test and maintain as little code as possible.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic