欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

spring 整合dwr

程序员文章站 2022-05-13 12:46:16
...

 web.xml

<!-- dwr配置 -->
	<servlet> 
	    <servlet-name>dwr-invoker</servlet-name> 
	    <servlet-class> org.directwebremoting.servlet.DwrServlet </servlet-class> 
        <init-param>
            <param-name>config_core</param-name>
            <!-- 如果有多个用","分开 -->
            <param-value>
                /WEB-INF/classes/dwr/dwr_core.xml
            </param-value>
         </init-param> 
		<init-param> 
		  <param-name>debug</param-name> 
		  <param-value>true</param-value> 
		</init-param> 
	</servlet> 
	<servlet-mapping>    
	  <servlet-name>dwr-invoker</servlet-name> 
	  <url-pattern>/dwr/*</url-pattern> 
	</servlet-mapping>
	

 dwr_core.xml

<?xml version="1.0" encoding="UTF-8"?>
<dwr>
	<allow>
		 <create javascript="userglFacade" creator="spring">
            <param name="beanName" value="test.userglFacadeImpl"/>
               <include method ="getUserList" />
               <include method ="getUserName" />
        </create>
        
	</allow>
</dwr>

 applicationContext_core.xml

<bean id="test.userglFacadeImpl" class="com.org.domain.test.impl.UserglFacadeImpl"/>

 

 

相关标签: dwr spring