aspose file tools*
The moose likes Servlets and the fly likes Session time out error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session time out error" Watch "Session time out error" New topic
Author

Session time out error

Jack pero
Greenhorn

Joined: Sep 09, 2005
Posts: 27
Hi,
I am using a filter whcih checks each time if the session is existing or not and at the time of login if there is no session, creates new session.
But now my issue is, when i am in the mid of application and somehow session expires, it should redirect to the Login page with the message - "Session expired". I am redirecting it to the login page, but how do i display session expired message for that.
Please help.
Thanks,
-Jack
Kaustabh Singha Roy
Ranch Hand

Joined: Oct 04, 2005
Posts: 43
One way is available to do it by checking the referrer header of HTTP after a no session condition is detected by the filter. If the session has expired middle of the application then the domain or the referrer must be the one of your application. This is one possibility. There may be better ways available.
Amar Deep Singh Chaudhary
Ranch Hand

Joined: Dec 26, 2006
Posts: 49
hi
to display the session expired message you can use an intermediate page which shows that the session is expired then from that page you can redirect to the login page.Thanks


AMAR DEEP CHAUDHARY

"a thinking mind never dies."


"A thinking mind never dies"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61594
    
  67

AMAR DEEP SINGH CHAUDHARY, please do us all a favor and change your display name to use mixed or lowercase. The all uppercase is rather jarring. Our eyes will thank you!


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jack pero
Greenhorn

Joined: Sep 09, 2005
Posts: 27
Hi,
I have to show the message on login page itself. But anyhow i am able to get it.
Thanks alot for your kind help and suggestions.

-Jack
"find a way, or make the one"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61594
    
  67

What message are you talking about?
Jack pero
Greenhorn

Joined: Sep 09, 2005
Posts: 27
I was just looking for a session timed out message to be displayed on the login page itself, when the session is invalidated or expired and the user is redirected to the login page.

-Jack
"find a way, or make the one"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61594
    
  67

No message will appear unless you put one there. If you want a message, create the HTML to display one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session time out error