wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes listener tag is not working in Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "listener tag is not working in Tomcat" Watch "listener tag is not working in Tomcat" New topic
Author

listener tag is not working in Tomcat

Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
I create a ServletContext Listener class


then i add the listener tag in web.xml file


my problem is if i put listener tag in web.xml my web application is not starting.
ranchers, Please tell me what is the problem.


SCJP 5.0<br />SCWCD 1.4<br />Preparing for <b>SCEA</b>.<br /><b>"I prefer an interesting vice to a virtue that bores."</b>
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

First, Try to remove the extra spaces


Then, put the listener into a package. You'll get unpredictable results by putting your classes in the default package.
[ November 17, 2006: Message edited by: Satou kurinosuke ]

[My Blog]
All roads lead to JavaRanch
Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
Satou, still its not working.I removed the space but still not wrking.
Another thing is i am not working with default web application.i hve a directory named Manning under webapps.

Is it the problem of tomcat?
Sreeraj G Harilal
Ranch Hand

Joined: Apr 19, 2006
Posts: 310
Sorry everyone.It was my fault. I forget to make that listener class public.
Sorry once again.
 
wood burning stoves
 
subject: listener tag is not working in Tomcat