Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error

 
Saravanan Mrajan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am using eclipse galileo and struts 1.3.10.

while testing it in tomcat, i am getting an error "org.xml.sax.SAXParseException: Document root element "struts-config", must match DOCTYPE root "null" ".

what could be the reason for this error?

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saravanan MahaRaj wrote:"org.xml.sax.SAXParseException: Document root element "struts-config", must match DOCTYPE root "null" ".

Google out the error.
And please look at you "strut-config.xml" file, it may defined using no DOCTYPE (dtd) declaration.
 
Saravanan Mrajan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Rohankar wrote:
Saravanan MahaRaj wrote:"org.xml.sax.SAXParseException: Document root element "struts-config", must match DOCTYPE root "null" ".

Google out the error.
And please look at you "strut-config.xml" file, it may defined using no DOCTYPE (dtd) declaration.



my struts-config.xml contains the doctype as below, so..?

<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DOCTYPLE looks OK.

Some suggestion,
please make sure libs and configuration are for Struts 1.3 and If you're using any IDE, eclipse, NB, as they come up with the xml validator, so validate this xml.
 
Saravanan Mrajan
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sagar Rohankar wrote:DOCTYPLE looks OK.

Some suggestion,
please make sure libs and configuration are for Struts 1.3 and If you're using any IDE, eclipse, NB, as they come up with the xml validator, so validate this xml.


Thanks!

i am using eclipse. i have placed all jar files of struts1.3 under 'lib' directory and .dtd files under 'WEB-INF' folder of my project.
but it's not working and again i am getting the same error.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Google this error and you can find this issue discussed before, go through the discussion and find out what you're missing.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic