• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parsing Error in web.xml

 
Harshada Deshmukh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have developed web application in Eclipse IDE and running application on weblogic8.1 I am facing error as follows

Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'web-app'. (line 2, column 10).>

could anybody help me for this
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does you web.xml have a web-app element? If it does, is your web.xml file valid XML? Are all opening and closing brakets there?
 
Harshada Deshmukh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,all tags are correct. i think problem is related with dtd but i am not sure
 
Akhilesh Trivedi
Ranch Hand
Posts: 1599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by harshada deshmukh:
...(line 2, column 10)...
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be you can post your web.xml file , and we figure out the problem !

or If you are using NetBeans, it provide the XML parser which checks your xml against the DTD ! I don't know about other IDE !
 
Harshada Deshmukh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my web.xml file

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>basiclogging</servlet-name>
<servlet-class>be.fgov.minfin.training.log4jlogging.BasicLoggingServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>logging</servlet-name>
<servlet-class>be.fgov.minfin.training.log4jlogging.LoggingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>basiclogging</servlet-name>
<url-pattern>/basiclogging</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>logging</servlet-name>
<url-pattern>/logging</url-pattern>
</servlet-mapping>
</web-app>
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your web-app tag is invalid, it should look something like

I have deliberately put the space in http so that it is not displayed as a URL


Hope this helps
[ September 18, 2008: Message edited by: Amit Ghorpade ]
 
Harshada Deshmukh
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for helping me!
My problem is resolved!
It was J2EE version problem while creating application in Eclipse and integerating with weblogic 8.1. Also I have done changes web.xml as

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
 
kriti jain
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please tell me how did you resolve this problem. I am facing the same problem. Please help me !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic