web.xml配置笔记

  web.xml配置笔记
 
        <context-param>
        <param-name>
            javax.servlet.jsp.jstl.fmt.localizationContext
        </param-name>
        <param-value>application_resource</param-value>
        </context-param>
        
        <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath:device.xml
         </param-value>
        </context-param>

        <context-param>
        <param-name>
            javax.servlet.jsp.jstl.fmt.fallbackLocale
        </param-name>
        <param-value>zh_CN</param-value>
        </context-param>
        
        <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>
            com.action.ActionServlet
        </servlet-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>
                /WEB-INF/StrutsConfig.xml
            </param-value>
        </init-param>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>detail</param-name>
            <param-value>0</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
       </servlet> 
       <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
       </servlet-mapping>
        <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>
            com.util.EncodingFilter
        </filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>ignore</param-name>
            <param-value>false</param-value>
        </init-param>
       </filter>
       <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.do</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.html</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.htm</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>*.js</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <welcome-file-list>
        <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>

你可能感兴趣的:(html,xml,Web,jsp,servlet)