spring+dwr

< servlet > < servlet-name > dwr-invoker </ servlet-name > < servlet-class > org.directwebremoting.spring.DwrSpringServlet </ servlet-class > < init-param > < param-name > debug </ param-name > < param-value > true </ param-value > </ init-param > < load-on-startup > 3 </ load-on-startup > </ servlet > <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> <!--Configurate Spring first!--> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <servlet-name>dwr-invoker</servlet-name> <servlet-class> org.directwebremoting.spring.DwrSpringServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.directwebremoting.org/schema/spring-dwr http://www.directwebremoting.org/schema/spring-dwr-2.0.xsd"> <!--<dwr:controllerid="dwrController"debug="true"/>--> <dwr:configuration> <dwr:convert class="ww.support.web.dwr.validate.FieldValidateInfo" type="bean"> </dwr:convert> </dwr:configuration> <bean id="genericValidatorDwr" class="ww.support.web.dwr.validate.GenericValidator"> <dwr:remote javascript="genericValidatorDwr"> <dwr:include method="isEmpty" /> <dwr:include method="isNotNumeric" /> <dwr:include method="isNumberNotInRange" /> <dwr:include method="isNumberGreaterThan" /> </dwr:remote> </bean> </beans>

你可能感兴趣的:(spring+dwr)