aspose file tools*
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 Spring in Action this week in the Spring 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: 319
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
 
 
subject: how to forward on session timed out in struts-config.xml