aspose file tools*
The moose likes Tomcat and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark ""listener"  tag in web.xml" Watch ""listener"  tag in web.xml" New topic
Author

"listener" tag in web.xml

Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Hi ranchers,

For debugging and testing purpose , i used tomcat 6.0 and put my
listener
tag in web.xml as follow .

This configuration , run fine.
Now when i give this code to my colleague , which wants this code to be integrated with our web app which uses struts 1.2 and tomcat 5.5 .
Now my problem is, the listener tag is not validate into our web apps web.xml , when we run app, the tomcat throws exception at this listener tag , saying cant parse the web.xml,

Now give me some solution , what goes wrong here ..

Thanks,

Regards,


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

What is the exact message printed in Tomcat's log ?


[My Blog]
All roads lead to JavaRanch
Anubhav Anand
Ranch Hand

Joined: May 18, 2007
Posts: 341

The <listener-class> tag takes the fully qualified class name. What I see that initially you might not have had packages during testing but, when you integrate the packages might exist.

Also, please post the error log, it will be helpful to comment on the actual problem.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

What I see that initially you might not have had packages during testing but, when you integrate the packages might exist.

Yes Anand , that is one issue , and i solved it .. Plus ,1 more interesting thing i learned is that , the xml schema i am using here, i am using 2.5 , but my colleague uses 2.3 , which doest not support listener tag !! we solved it , thanks for the reply.

regards,
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

but my colleague uses 2.3 , which doest not support listener tag

Servlets 2.3 support listeners.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: "listener" tag in web.xml