aspose file tools*
The moose likes Servlets and the fly likes Show popup when session time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Show popup when session time out" Watch "Show popup when session time out" New topic
Author

Show popup when session time out

aishwarya lakshmi
Greenhorn

Joined: Nov 18, 2008
Posts: 20
Hi in my application i need to show a popup when session is expires... As of now when we make a event on page once after a session time out it will say session time out..
But now i need to show a pop up once session expires.. please help me how to do this....

Thanks
Aishwarya
Chris Hunter
Greenhorn

Joined: Mar 03, 2010
Posts: 1
Does it need to be a pop-up or can it be handled by an error page? Session expiry is only known to the server when the user makes a request so they are already navigating, I suppose you could use some AJAX on every request that checks session status prior to navigating



Java Tutorial


Art is the mathematics of emotion
aishwarya lakshmi
Greenhorn

Joined: Nov 18, 2008
Posts: 20
Is there any change of redirecting to some page or show a pop up directly from servlet when session expires...
adil qureshi
Ranch Hand

Joined: Jul 11, 2008
Posts: 48
see it depends on how you are handling the session.... What you can do that as your session expire send the request to a jsp or an intermediate HTML page and then close this one on body load .... close this page and from here open your pop .... hope that will solve your purpose .....


SCJP 1.5,SCWCD 1.5
aishwarya lakshmi
Greenhorn

Joined: Nov 18, 2008
Posts: 20
adil qureshi wrote:see it depends on how you are handling the session.... What you can do that as your session expire send the request to a jsp or an intermediate HTML page and then close this one on body load .... close this page and from here open your pop .... hope that will solve your purpose .....



How to make a event at the time of session failure..... For example i need to do something when session failure.....How to do it....
adil qureshi
Ranch Hand

Joined: Jul 11, 2008
Posts: 48
session failure ....? are you talking about session invalidated or what ... any ways that will be some error code just do this in web.xml
<error-page>
<error-code>404</error-code>
<location>/WEB-INF/pages/errorPage.jsp</location>
</error-page>

<error-page>
<error-code>403</error-code>
<location>/WEB-INF/pages/errorPage.jsp</location>
</error-page> and use this as an intermediate page also you can use the same page again using some different parameters
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61610
    
  67

Of course not. When the session expires on the server, how would you know which of the billion nodes connected to the Internet to alert (even if you could)?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Show popup when session time out