Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

ServletRequestListener when does requestDestroyed() is called  RSS feed

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
requestInitialized() is called when we first hit the servlet.
and when does requestDestroyed() is called.

Is it called just after requestInitialized() is done ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you understand what the javadocs of that method say?

Irrespective of that, does "...called just after requestInitialized() is done..." sound likely, or useful?
 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn`t understand.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, when do you think a "request initialized" event should be fired, and when a "request destroyed" event? Have you done any experiments to see when it is fired, like you did for other listeners? If not, that's what you could start with.

What do you think this (the javadocs that you should have read by now) is trying to say:
A ServletRequestListener can be implemented by the developer interested in being notified of requests coming in and out of scope in a web component. A request is defined as coming into scope when it is about to enter the first servlet or filter in each web application, as going out of scope when it exits the last servlet or the first filter in the chain.

(Please don't just say "I didn't understand", think about it first.)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!