dwr总结

dwr参考文档: http://directwebremoting.org/dwr/index.html
配置web.xml
<servlet>
  <servlet-name>dwr-invoker</servlet-name>
  <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>dwr-invoker</servlet-name>
  <url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
配置dwr.xml
默认converter
<convert converter="collection" match="java.util.Collection"/>
and
<convert converter="map" match="java.util.Map"/>
JavaBean Convert
<convert converter="bean" match="com.test.Person"/>
creater
new: Which uses the Java 'new' operator.
<create creator="new" javascript="dwrtest">
      <param name="class" value="com.test.DwrTest"/>
</create>
spring: Gives access to beans through the Spring Framework.
<allow>
    <create creator="spring" javascript="xxService">
      <param name="beanName" value="xxService"/>
    </create>
  </allow>

你可能感兴趣的:(java,spring,xml,servlet,DWR)