码迷,mamicode.com
首页 > Web开发 > 详细

例子代码:web.xml

时间:2015-01-06 17:38:52      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:

<?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">
  
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
      
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext-*.xml</param-value>
    </context-param>
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
  
  <servlet>
    <servlet-name>BookServlet</servlet-name>
    <servlet-class>servlet.BookServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>BookServlet</servlet-name>
    <url-pattern>/BookServlet</url-pattern>
  </servlet-mapping>
  
</web-app>  
  

 

例子代码:web.xml

标签:

原文地址:http://www.cnblogs.com/aicpcode/p/4206188.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!