• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Show popup when session time out

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
aishwarya lakshmi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there any change of redirecting to some page or show a pop up directly from servlet when session expires...
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 .....
 
aishwarya lakshmi
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
I can't take it! You are too smart for me! Here is the tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic