• 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>
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!