• 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

what is the property, in tomact to call a JSP page, after session expires?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai all
There is a property to call a jsp after the session expires. What is that property which we will specify in 'web.xml'
If a session expires, i want to call or redirect a JSP file automatically. I don't want the code for that.
Tomcat is having a property where we can specify the JSP file and if session expires it will automatically load the specified JSP file.
What is that property?

Please reply me immediately
Thank you
Regards
Nathan
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are a little mixed up. I know of no property such as you describe.
The session object (a javax.servlet.http.HttpSession) has a method isNew() that will return true if the session was just created.
You can attach an object implementing the HttpSessionBindingListener interface to a session to get notified when a session is destroyed.
I don't know of any connection between session objects and the loading of JSP pages.
Bill
------------------
author of:
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, but I don't think you have a clear understanding of how client server works!
The server has no way of contacting the client and sending it a JSP page when the session expires...therefore the feature that you describe does not make sense.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this case it might probably make sense to have a sleeping applet that gets a notification from the server when the session expires.
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kevin:

The server has no way of contacting the client...

I would take this stmt with a grain of salt.
You might want to research a little bit on the
concept of pushlets. This is a fairly
recent topic and I remember seeing an article
in Javaworld. Sorry I don't have the link right now.
regds.
- satya
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Actually, this probably maybe a solution to what the
original question wanted to solve....aha! search tools
Servlet based notification called pushlets.
regds.
- satya
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think "pushlets" are a practical solution since they require an open connection for each client - this implies that the server will have to devote a Thread to each client. If you had a high traffic site this would chew up a lot of server resources.
Some kind of a "heartbeat" applet or Javascript method is more appropriate.
Bill
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks for the insight, Bill.
Just clarifying, personally, I never got a chance to read
the article myself. I printed it out abt a week back and its
still dusting on my desk. well, one of these days I guess...
regds.
- satya
 
Jack Wiesenthaler
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
once the HTTP request is processed by the web server and the connection is **closed**, it is impossible for the server to contact the client back, client meaning a web browser not any applet functioning as a server.
The original post asked for a notification when the session has expired on the server which means that the client and server have not been communicating for a while. The concept of pushlets has no relevance here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic