Programming/JAVA

web.xml 태그 작성 순서

Edward. K 2008. 8. 6. 10:37
반응형

 http://java.sun.com/dtd/web-app_2_3.dtd 
The web-app element is the root of the deployment descriptor for a web application.

<!ELEMENT web-app (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*)>

위에서 설명된 바와 같이.. 다음과 같은 순서대로 작성을 해야 한다.
    icon
    display-name
    description
    distributable
    context-param*
    filter*
    filter-mappiing*
    servlet*
    servlet-mapping*
    session-config
    mime-mapping
    welcome-file-list
    error-page*
    tablib*
    resource-env-ref*
    reource-ref*
    security-constraint*
    login-coonfig
    security-role
    env-entry
    ejb-ref
    ejb-local-ref


거부한다면..?
다음과 같이.. '왜 규칙을 안지키냐!!'며 화를 낼 것이다..   어떻게 하라고 다시 공지해주면서..
 org.xml.sax.SAXException: 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*

거기다가..잘못된 라인까지꼭 집어준다. 
@ vfsfile:/C:/jboss5/server/default/deploy/ROOT.war/WEB-INF/web.xml[48,11]
반응형