<?xml?version="1.0"?encoding="UTF-8"?><!DOCTYPE?web-app?PUBLIC?"-//Sun?Microsystems,?Inc.//DTD?Web?Application?2.2//EN"?"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"><web-app?id="WebApp_ID"><display-name>servyou</display-name>????<filter>??<filter-name>login</filter-name>??<filter-class>servlet.servletfilter</filter-class>??</filter>????<filter-mapping>???<filter-name>login</filter-name>???<url-pattern>task.jsp</url-pattern>??</filter-mapping>??<servlet>????<servlet-name>Ser</servlet-name>????<display-name>This?is?the?display?name?of?my?J2EE?component</display-name>????<description>This?is?the?description?of?my?J2EE?component</description>????<servlet-class>servlet.Ser</servlet-class>??</servlet>???<servlet-name>Ser</servlet-name>????<url-pattern>/login</url-pattern>??</servlet-mapping>??<servlet-mapping>?????<welcome-file-list>?? <welcome-file>index.html</welcome-file>?? <welcome-file>index.htm</welcome-file>?? <welcome-file>login.jsp</welcome-file>?? <welcome-file>default.html</welcome-file>?? <welcome-file>default.htm</welcome-file>?? <welcome-file>default.jsp</welcome-file>??</welcome-file-list></web-app>如果不增加filter的配置就正確,但是一添加就報(bào)錯(cuò),報(bào)錯(cuò)信息為T(mén)he?content?of?element?type?"web-app"?must?match?"(icon?,display-?name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-?mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-?config?,security-role*,env-entry*,ejb-ref*)".
web 應(yīng)用,在web.xml中配置servlet filter報(bào)錯(cuò)
怪盜飯團(tuán)
2016-05-12 10:19:25