web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app 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/web-app_2_4.xsd" version="2.4"> <display-name>vi</display-name> <description>整理一下验证码,生成不同形式的验证码</description> <icon> <!-- 这个没什么意义,可以查看index.html页面那个icon,那个挺酷 --> <small-icon>/images/logo.gif</small-icon> </icon> <!-- 可以使用distributable元素来告诉servlet/JSP容器,编写将在分布式Web容器中部署的应用 --> <!-- <distributable /> --> <context-param> <param-name>jdbcDriver</param-name> <param-value>com.mysql.jdbc.Driver</param-value> </context-param> <!-- 验证码1 --> <servlet> <servlet-name>validateImage1</servlet-name> <servlet-class>com.xue0610.common.ValidateImage1</servlet-class> </servlet> <servlet-mapping> <servlet-name>validateImage1</servlet-name> <url-pattern>v1/*</url-pattern> </servlet-mapping> <!-- 验证码2 --> <servlet> <servlet-name>validateImage2</servlet-name> <servlet-class>com.xue0610.common.ValidateImage2</servlet-class> </servlet> <servlet-mapping> <servlet-name>validateImage2</servlet-name> <url-pattern>v2/*</url-pattern> </servlet-mapping> <filter> <filter-name>TimeFilter</filter-name> <filter-class>com.xue0610.common.TimeFilter</filter-class> </filter> <filter-mapping> <filter-name>TimeFilter</filter-name> <servlet-name>*</servlet-name> </filter-mapping> <!-- 欢迎页面 --> <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> </welcome-file-list> <!-- 错误页面 --> <error-page> <error-code>404</error-code> <location>/error/404.html</location> </error-page> <error-page> <error-code>500</error-code> <location>/error/500.html</location> </error-page> </web-app>
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。