This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"listener" tag in web.xml

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the exact message printed in Tomcat's log ?
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but my colleague uses 2.3 , which doest not support listener tag

Servlets 2.3 support listeners.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic