web.xml讲解
2007-06-15 17:16Update
web.xml详解
web.xml例:
web.xml
web.xml<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- [OPTIONAL] --> <icon> <small-icon>/myappLargeIcon.gif</small-icon> <large-icon>/myappLargeIcon.gif</large-icon> </icon> <!-- [OPTIONAL] --> <display-name>MyWebApp</display-name> <!-- [OPTIONAL] --> <description>This is a my first web-app</description> <!-- [OPTIONAL] Notice: Objects in HttpSession must implement the Serializable interface for distributable --> <distributable /> <!-- [OPTIONAL] context parameter defination. --> <context-param> <param-name>MyContextParamName</param-name> <param-value> MyContextParamValue </param-value> <description>My context param name defination</description> </context-param> <!-- [OPTIONAL] --> <filter> <filter-name>MyAppFilter</filter-name> <filter-class>com.syboos.filter.MyAppFilter</filter-class> <init-param> <param-name>name</param-name> <param-value>some value</param-value> </init-param> </filter> <!-- [OPTIONAL] --> <filter-mapping> <filter-name>MyAppFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- [OPTIONAL] --> <listener> <listener-class>com.syboos.listener.MyContextListener</listener-class> </listener> <!-- [OPTIONAL] --> <servlet> <servlet-name>MyServlet</servlet-name> <servlet-class>com.syboos.myapp.MyServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- [OPTIONAL] --> <servlet-mapping> <servlet-name>MyServlet</servlet-name> <url-pattern>/MyServlet/*</url-pattern> </servlet-mapping> <!-- [OPTIONAL] --> <session-config> <session-timeout>60</session-timeout> </session-config> <!-- [OPTIONAL] --> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- [OPTIONAL] --> <error-page> <error-code>404</error-code> <location>/404Error.html</location> </error-page> <!-- [OPTIONAL] --> <taglib> <taglib-uri>/WEB-INF/tld/MyTag.tld</taglib-uri> <taglib-location>/WEB-INF/tld/MyTag.tld</taglib-location> </taglib> <!-- [OPTIONAL] --> <ejb-local-ref> <ejb-ref-name>ejb/myEjbLocal</ejb-ref-name> <ejb-ref-type>Entity</ejb-ref-type> <local-home>com.syboos.ejb.MyEjbLocalHome</local-home> <local>com.syboos.ejb.MyEjbLocal</local> <ejb-link>MyEjbBean</ejb-link> </ejb-local-ref> </web-app>
- Relative Articles
- Session处理中的事件侦听(下) - (2007-08-21 13:30)
- Session处理中的事件侦听(上) - (2007-08-21 13:06)
- Session处理初步 - (2007-08-17 14:49)
- WEB开发里需要理解的几个基本概念 - (2007-05-29 00:44)