日期:2014-05-19 浏览次数:20755 次
<filter> <filter-name>dynamicServletFilter</filter-name> <filter-class>key.kotori.servlet.DynamicServletFilter</filter-class> </filter> <filter-mapping> <filter-name>dynamicServletFilter</filter-name> <url-pattern>*.slt</url-pattern> </filter-mapping> <servlet> <servlet-name>user</servlet-name> <servlet-class>com.kotori.servlet.UserServlet</servlet-class> </servlet>
public class UserServlet extends DynamicServlet { //这纯粹是一个servlet,其中DynamicRequest和DynamicResponse //是实现了HttpServletRequest和HttpServletResponse接口的 public void list(DynamicRequest request, DynamicResponse response) { } public void add(DynamicRequest request, DynamicResponse response) { } public void delete(DynamicRequest request, DynamicResponse response) { } public void update(DynamicRequest request, DynamicResponse response) { } ...... }