I was asked in interview "We have developed application using struts having 1000 actions.Now we want to add code like whenever session expires redirect every action to single page,this needs to be done using struts framework instead of moving to every action class and edit them inorder to redirect to a page when session expires."
Please Help.Provide me answer to this question..Thanks in Advance
It's not at all a great question I consider, You do it in interceptors if you were using Strtus2. Interceptors are triggered before (and/or) after hitting the action. In this scenario we will write an interceptor which take care identifying the whether user is having valid session or not. That's it. We can set session timeout in web.xml as well.
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.
Joined: Apr 12, 2012
Thanks for reply..
What can be done in case of struts 1.2 as I am using this in our project and also I dont have any idea of struts2.Session timeout is just for making session available for ample amount of time.Here I need to forward to specific JSp during session time out , how it can be done in struts1.
subject: Session Validation for application having 1000 Action classes without redundant code in Actions?