This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes how to forward on session timed out in struts-config.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to forward on session timed out in struts-config.xml" Watch "how to forward on session timed out in struts-config.xml" New topic
Author

how to forward on session timed out in struts-config.xml

Alejandro Barrero
Ranch Hand

Joined: Aug 01, 2005
Posts: 309
Browsing thru the Internet, it appears that it is possible to forward to a login page from the struts-config.xml file when the session times out. if this is possible, please tell me how to do it.

Alejandro Barrero


Your help will be greatly appreciated,
Alejandro Barrero
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I don't know if it's possible to do this entirely from entries in the struts-config.xml file, but I do like the approach suggested by Kevin H. Le in This Article from Java World.

I'd modify his approach somewhat, though. He suggests creating a base Action class with the login check. Now that we have a pluggable Request Processor in Struts 1.3.8, I'd suggest adding another command to the chain that handles the login check. That way you don't have to modify Action classes at all.
[ March 19, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: how to forward on session timed out in struts-config.xml
 
Similar Threads
Retrieving properties file
STRUTS - Remebering page access after login
forward problem
Session problem
How to prevent creating a new session whenever a resource is mapped from struts-config.xml