This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring2.5,Spring Security2.0.5, DWR app session timeout redirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring2.5,Spring Security2.0.5, DWR app session timeout redirect" Watch "Spring2.5,Spring Security2.0.5, DWR app session timeout redirect" New topic
Author

Spring2.5,Spring Security2.0.5, DWR app session timeout redirect

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hello,

I have a web application using Spring(version 2.5),Spring Security (version 2.0.5) and DWR.I am facing some issue when the session timeout.
On session timeout the application should redirect the user to login page.But that is not happening.When the timeout had occured and then the user clicks on any of the links in the application, the user is taken to the target page for the clicked link but with no data since the data is user specific and user id is not found in the session.In Spring Security 3.0 this feature is available readily.

But I have no option of upgrading either Spring/Spring Security presently.In such a case how can I redirect the user to a desired page when timeout occurs.I tried implementing a session timeout filter but I end up finding that it was actually a wrong approach.That filter was getting called up in the chain even when invalid session was found.



Below is a portion from Spring Security logs.



Kindly guide me in achieving the desired result.


Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi,

Is there no one who can help me resolve this issue?
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

In the DWR code : /dwr/call/plaincall/yguserservice.invokegethomepageleftpanecontent.dwr
Can't you check for HttpSession==null and redirect to login page as the first line of code?


===Vyas Sanzgiri===
My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring2.5,Spring Security2.0.5, DWR app session timeout redirect
 
Similar Threads
Spring Security
Spring Security
Web App hangs up when opening hibernate session factory
Migrating from spring security 2.x to spring security 3.x
Help, Security !