This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Doubt About Listeners?

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements are correct?

1.There can be multiple instances of the listener class configured in the web.xml

2.One listener class can be used to listen for multiple kinds of events.

Point 2 is ok.
I have a doubt about point 1.
How point 1 can be achieved.

Thanks
 
Arvind Giri
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How point 1 can be achieved.


I think following should work....
We are specifying same filter class with different filter name.

<web-app>

-------
-------

<filter>
<filter-name>myFilter1</filter-name>
<filter-class>
com.arv.MyFilter
</filter-class>
</filter>
<filter>
<filter-name>myFilter2</filter-name>
<filter-class>
com.arv.MyFilter
</filter-class>
</filter>

--------
--------
</web-app>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic