Tuesday 15 February 2011

java - xml error due to servlet file Cannot find the declaration of element , Referenced file contains errors -


I do not know why this error might occur, how can someone solve me -

  1. cvc-elt.1: 'web_1: web-app' element can not be announced
  2. There are errors in the referenced file (jar: file: / c: / program files / eclipse / plugins / org.eclipse.jst.standard.schemas_1.2.0.v201101142102.jar ! /dtdsAndSchemas/web-app_2_5.xsd). For more information, right-click on the message in the problem view and select "Show Details ..."

    These are two errors I have to face And that's because I added a mistake of servlet which I intend to add a normal class file to my project. Then both of these errors show that I also delete the servlet file. This is my XML code (actually the originalThe Od) - As I have not yet used a single Sublette file, I only used the jsp file.

    Still the XML file -

         

    "Your web. Better to remove the context of the schema "xmlns: web_1" from the Xml file during this time, follow a practical snippet based on the problem of Saurabh:

      & lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Web-app xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://java.sun.com/xml/ns/javaee" xmlns: web = "http: //java.sun.com/xml/ns/javaee/web-app_2_4.xsd "xsi: Schema Location =" http://java.sun.com/xml/ns/javaee http: //java.sun Com / Xml / ns / javaee / web-app_3_0.xsd "id =" WebApp_ID "version =" 3.0 "& gt; & Lt; Display-name & gt; InitialD & lt; / Display-name & gt; & Lt; Welcome-file-list & gt; & Lt; Welcome-file & gt; Index.html & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Index.htm & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Index.jsp & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.html & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.htm & lt; / Welcome-file & gt; & Lt; Welcome-file & gt; Default.jsp & lt; / Welcome-file & gt; & Lt; / Welcome-file-list & gt; & Lt; / Web application & gt;    

No comments:

Post a Comment