Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order for Listeners,Filters,Servlets

 
Gorkal Raghavendra
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please tell me all the possible orders for servets,Listeners,filters?

In this case:
when servlet is declared as <load-on-start-up>1</load-on-start-up>
when contextlistener is implemented


In this case:
when <load-on-start-up> is not declared
when contextlistener is implemented


In this case:
when servlet is declared as <load-on-start-up>1</load-on-start-up>
when sessionlistener or requestlistener is implemented


Please help me
 
Kunal Jag
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before a deployed Web application can begins processing client requests, the container performs a number of steps to deliver its services. Following is the order a servlet container follows:

Listener classes
The container instantiates an instance for each event listener identified by a <listener> element in the deployment descriptor.

Filters
Next, the container instantiate an instance of each filter identified by a <filter> element in the deployment descriptor and calls each filter instance�s init() method.

Servlets
Finally, an instance of each registered servlet identified by a <servlet> element that includes a <load-on-startup> element in the order defined by the <load-on-startup> element values, and call each servlet�s init() method.

Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic