• Post Reply Bookmark Topic Watch Topic
  • New Topic

Listener in JSP

 
Xinyi Zhang
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a class implements javax.servlet.ServletContextAttributeListener, then register the listener class in web.xml. My question is how to register a lister in JSP?

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35743
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Xinyi,
You do the same thing: create a class and register it in web.xml. Servlets and JSPs are both part of a web application. In fact, JSPs get compiled into servlets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!