web.xml常用配置
<servlet> <servlet-name>test</servlet-name> <servlet-class>TestServlet</servlet-class> <init-param> <param-name>email</param-name> <param-value>1@163.com</param-value> </init-param></servlet><servlet-mapping> <servlet-name>test</servlet-name> <url-pattern>/test.do</url-pattern></servlet-mapping>
<filter> <filter-name>Filter</filter-name> <filter-class>FilterClass</filter-class> <init-param> <param-name>size</param-name> <param-value>20</param-value> </init-param></filter><filter-mapping> <filter-name>Filter</filter-name> <url-pattern>/comment</url-pattern> </filter-mapping>
<context-param> <param-name>email</param-name> <param-value>1@163.com</param-value></context-param>
<listener> <listener-class> com.demo.MyListener </listener-class></listener>
<session-config> <session-timeout>15</session-timeout></session-config>
<servlet> <servlet-name>test</servlet-name> <jsp-file>/test.jsp</jsp-file> <init-param> <param-name>email</param-name> <param-value>1@163.com</param-value> </init-param></servlet><servlet-mapping> <servlet-name>test</servlet-name> <url-pattern>/test.jsp</url-pattern></servlet-mapping>
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid> <el-ignored>true</el-ignored> </jsp-property-group></jsp-config>
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcom-file>default.jsp</welcome-file></welcome-file-list>