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 Servlets and the fly likes SAXParseException Problem in Tomcat 4.0 server 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 » Java » Servlets
Bookmark "SAXParseException Problem in Tomcat 4.0 server" Watch "SAXParseException Problem in Tomcat 4.0 server" New topic
Author

SAXParseException Problem in Tomcat 4.0 server

Chidanand Chauhan
Ranch Hand

Joined: Nov 10, 2005
Posts: 77
Hi
Can any body tell me, when i put the <Listener>element in the web.xml file as mentioned in the HFSJ and then deploy the the web-application it gives the SAXParseException in the server.

Can any body tell me the the listener elements are supported in the tomcat 4.0 or not.

Similarly the <context-param> elements are also having some problem. I think the context param elements generally written to the top of the web.xml after <web-app>.
Chidanand Chauhan
Ranch Hand

Joined: Nov 10, 2005
Posts: 77
Originally posted by Chidanand Chauhan:
Hi
Can any body tell me, when i put the <Listener>element in the web.xml file as mentioned in the HFSJ and then deploy the the web-application it gives the SAXParseException in the server.

Can any body tell me the the listener elements are supported in the tomcat 4.0 or not.

Similarly the <context-param> elements are also having some problem. I think the context param elements generally written to the top of the web.xml after <web-app>.

Do any one have any idea for the above problem. Please help me out

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Chidanand Chauhan:

Do any one have any idea for the above problem. Please help me out



you can check out the DTD which is there in the top is the XML..check the apache site for the DTD. if that supports listner then that is ok .there should not be any problem.Another thing is the xml parser implementation that you are using might be causing the problem

cheers!
--Rahul


Rahul Bhattacharjee
LinkedIn - Blog
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

In more recent versions of Tomcat, the order of elements in the web.xml file is not important. I believe it still is in Tomcat 4x though.
Maybe you have the elements out of order?

There is a link to the servlet spec in my signature.
You will find diagrams with the proper order of elements in there.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Chidanand Chauhan
Ranch Hand

Joined: Nov 10, 2005
Posts: 77
Originally posted by Ben Souther:
In more recent versions of Tomcat, the order of elements in the web.xml file is not important. I believe it still is in Tomcat 4x though.
Maybe you have the elements out of order?

There is a link to the servlet spec in my signature.
You will find diagrams with the proper order of elements in there.


Hi Ben

I have found the problem from where does this starts.
specially in tomcat v4.0.3 there should be the order of the elements in web.xml
 
Consider Paul's rocket mass heater.
 
subject: SAXParseException Problem in Tomcat 4.0 server
 
Similar Threads
org.xml.sax. SAXParseException: Element type "web-app" must be declared.
ServletContext InitParameter Problem
JSF based Portlet with MyFaces bridge
Context [/HibernateTest] startup failed due to previous errors
JSF based Portlet with MyFaces bridge