标签:Servlet3.0
1.什么是servlet3.0<servlet>
<servlet-name>Test</servlet-name>
<servlet-class>com.test.servlet.Test</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Test</servlet-name>
<url-pattern>/test</url-pattern>
</servlet-mapping>
5.@WebFilter代替web.xml中
<filter>
<filter-name>filt</filter-name>
<filter-class>com.test.servlet.MyFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyFilter</filter-name>
<url-pattern>/myFilter</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
6@WebListener代替xml中
<listener>
<listener-class>com.test.servlet.MyLister</listener-class>
</listener>
标签:Servlet3.0
原文地址:http://blog.51cto.com/13579086/2083432