Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting access to HttpServletResponse with in sessionDestroyed Method of HttpSessionListener

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Could anybody please let me know wheter this below requirement is possible ??

Is it possible to get access to HttpServletResponse reference with in sessionDestroyed method of HttpSessionListener .

Please suggest , thanks .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no HTTP request or response when a session is destroyed.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd have to RTFM. But I doubt it. Under certain circumstances, such as after the timeout interval has expired, the container may decide to destroy an HttpSession even though no request/response process is in progress. In fact, timeout pretty much [b]guarantees[/i] no request/response was in progress, since a new request would have reset the timer.

And, of course, if there was no request/response, there's no response object to get hold of.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then how do people implemented this functionality (Showing a Alert before session expires )
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18156
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Kiran Va wrote:Then how do people implemented this functionality (Showing a Alert before session expires )


They run a JavaScript timer on the client side. HTTP servers are not permitted to send unsolicited data, and that includes "timeout pending" messages.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They run a JavaScript timer on the client side.


Could you please elobrate little bit this ??
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic