Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Doubt About Listeners?  RSS feed

 
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
Boost this thread!