This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 14687
    
  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: 14687
    
  16

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

Servlets 2.3 support listeners.
 
 
subject: "listener" tag in web.xml
 
Similar Threads
'The requested resource is not available' error
Why context listeners not configured in web.xml in some way of WS implementation?
how to call JSP from Servlet
How to set Servlet as welcome-file...or to load instead of index.jsp
requested resource not found error