File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Session out in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Session out in Struts" Watch "Session out in Struts" New topic

Session out in Struts

Asheesh Nehra
Ranch Hand

Joined: Jun 25, 2009
Posts: 35
Hello, how to handle session time out in struts , i did like this but this is not working

and added a controller like this

whats wrong with this code???
Ankit Garg

Joined: Aug 03, 2008
Posts: 9462

I don't know much about struts 1.x, but the documentation says that if you return false from the requestPreprocess method, then the request processing will halt. So your class looks fine to me. I found two ways of configuring custom controller


the one that you are using.

The only point that might you maybe doing wrong is where you are declaring that element. I found that it must be declared after all action elements (usually deployment fails if there is anything wrong with xml configuration files like order of elements so I'm not sure if that's the cause)...

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Asheesh Nehra
Ranch Hand

Joined: Jun 25, 2009
Posts: 35
thanks for reply, In stuts config file I am using tile , and processor Class is pointing to it also. Now can you tell ,can i use processor Class class for multiple purpose like tiles and session too?.
I agree. Here's the link:
subject: Session out in Struts
jQuery in Action, 3rd edition