0

I am new to spring mvc while am creating an sample app I have an error in web.xml file.

This is my web-app tag:

<web-app id="WebApp_ID" version="2.4" 
    xmlns="http://java.sun.com/xml/ns``/j2ee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">   

and I am getting the error:

Multiple annotations found at this line:

- Attribute "version" must be declared for element type "web-app".
- Attribute "xsi:schemaLocation" must be declared for element type "web-app".
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-
 param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-
 page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
- Attribute "xmlns" must be declared for element type "web-app".
- Attribute "xmlns:xsi" must be declared for element type "web-app".
Blauharley
  • 4,186
  • 6
  • 28
  • 47
Terrible Coder
  • 880
  • 9
  • 10

1 Answers1

1

Your web.xml contains unnecessary characters: "``"

Correctly web.xml:

<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
slawek
  • 328
  • 1
  • 10