web-app_2_3.dtd
<?xml version="1.0" encoding="UTF-8"?> <!-- <!DOCTYPE web-app SYSTEM "web-app_2_3.dtd"> --> <!ELEMENT web-app (servlet*,servlet-mapping* , welcome-file-list?) > <!ELEMENT servlet (servlet-name,description?,(servlet-class|jsp-file))> <!ELEMENT servlet-mapping (servlet-name,url-pattern+) > <!ELEMENT servlet-name (#PCDATA)> <!ELEMENT servlet-class (#PCDATA)> <!ELEMENT url-pattern (#PCDATA)> <!ELEMENT description (#PCDATA)> <!ELEMENT jsp-file (#PCDATA)> <!ELEMENT welcome-file-list (welcome-file+)> <!ELEMENT welcome-file (#PCDATA)> <!ATTLIST web-app version CDATA #IMPLIED>
web.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app SYSTEM "web-app_2_3.dtd"> <web-app version="1.0"> <servlet> <servlet-name></servlet-name> <servlet-class></servlet-class> </servlet> <servlet-mapping> <servlet-name></servlet-name> <url-pattern></url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file></welcome-file> </welcome-file-list> </web-app>