2017-12-31 50 views
0

샘플 응용 프로그램을 만드는 동안 spring mvc에 익숙하지 않습니다. web.xml 파일에 오류가 있습니다. 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"> 

나는 오류가 점점 오전 :

- 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". 
+0

공유 전체'web.xml' 파일 –

+0

, 당신의 web.xml 파일을 제시해주십시오. – rodgenk

+0

안녕하세요. 내 문제는 ur comments 덕분에 해결되었습니다. 문제는 XML 파일에 xml 버전을 추가하지 않았기 때문입니다. –

답변

0

당신의 web.xml에 불필요한 포함 :이 라인에서 찾을

여러 주석을 문자 : "``"

올바르게 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"> 
관련 문제