RSS
热门关键字:  java  Ajax  JSP  JSF  Struts
当前位置 : 首页>Spring>列表

webservice-之使用xfire+spring开发

来源:勇哥的BLOG 作者: 时间:2008-03-03 点击:

web.xml

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee

    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <!-- 配置文件路径开始,指定加载的配置文件 -->

    <context-param>

        <param-name>contextConfigLocation</param-name>

        <param-value>

            /WEB-INF/classes/applicationContext*.xml

            classpath:org/codehaus/xfire/spring/xfire.xml

        </param-value>

    </context-param>

    <!-- 启动时加载SpringContextServlet -->

    <listener>

        <listener-class>

            org.springframework.web.context.ContextLoaderListener

        </listener-class>

    </listener>

    <listener>

        <listener-class>

            org.springframework.web.util.IntrospectorCleanupListener

        </listener-class>

    </listener>

    <!-- XFire 配置 -->

    <servlet>

        <servlet-name>xfire</servlet-name>

        <servlet-class>

            org.springframework.web.servlet.DispatcherServlet

        </servlet-class>

    </servlet>

    <servlet-mapping>

        <servlet-name>xfire</servlet-name>

        <url-pattern>*.ws</url-pattern>

    </servlet-mapping>

 

    <welcome-file-list>

        <welcome-file>index.jsp</welcome-file>

    </welcome-file-list>

</web-app>

这里注意:classpath:org/codehaus/xfire/spring/xfire.xml必须要写进去。

----------------------------------------------

xfire-servlet.xml 新建这个文件,并且和web.xml放在同一个文件夹。

注意: 名称和位置都不能变。

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"

"http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

共3页: 上一页 [1] 2 [3] 下一页
最新评论共有 0 位网友发表了评论
发表评论
评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名: 密码:
匿名?
注册
Google Adsense
相关文章