This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes listener element error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "listener element error" Watch "listener element error" New topic
Author

listener element error

Nesan Krish
Ranch Hand

Joined: Feb 20, 2004
Posts: 40
One of my servlets implements HttpSessionListener, and I configured that in the deployment descripter using <listener> element. But the tool (Jbuilder) I used is showing an error message "Element type 'listener' must be declared".

I placed <listener> element before the servlets declared (that is the J2EE specification) and just after the <desplay-name> element. My configuration looks like the following:

<listener>
<listener-class>com.space.chat.ChatDispatch</listener-class>
</listener>

I use servlet version 2.2.

Please anyone help me. Thanks very much in advance.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Listeners showed up in version 2.3


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: listener element error
 
Similar Threads
Small listener element doubt
web.xml error
Listener started twice
Calling a servlet on startup
ServletContextListener Deployment