修改standardlesson项目中的web.xml文件,最终完整代码如下所示:
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class>com.bstek.dorado.web.servlet.SpringContextLoaderListener</listener-class> </listener> <filter> <filter-name>OpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> <init-param> <param-name>excludeSuffixs</param-name> <param-value>js,css,jpg,gif,png</param-value> </init-param> </filter> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>*.d</url-pattern> </filter-mapping> <filter-mapping> <filter-name>OpenSessionInViewFilter</filter-name> <url-pattern>/dorado/*</url-pattern> </filter-mapping> <servlet> <servlet-name>doradoServlet</servlet-name> <servlet-class>com.bstek.dorado.web.servlet.DoradoServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>doradoServlet</servlet-name> <url-pattern>*.d</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>doradoServlet</servlet-name> <url-pattern>*.dpkg</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>doradoServlet</servlet-name> <url-pattern>/dorado/*</url-pattern> </servlet-mapping> </web-app>