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

web.xml配置

时间:2016-10-14 09:54:10      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:

1.web 项目为servlet容器,所有的类要在里面进行声明。

2.对spring的配置

<!--设置spring环境-->
  <context-param>
      <!--contextConfigLocation是不能修改的  -->
      <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>

 3.配置servlet

  <servlet>
      <servlet-name>CXF</servlet-name>
      <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
  </servlet>
  <!--映射(路径和扩展映射)--->
  <servlet-mapping>
      <servlet-name>CXF</servlet-name>
      <url-pattern>/ws/*</url-pattern>
  </servlet-mapping>

 

web.xml配置

标签:

原文地址:http://www.cnblogs.com/glblog/p/5958961.html

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