原文http://www.jb51.cc/article/p-drjrcnmm-pp.html
DWR高级主题之反向Ajax(DWR3的comat模式演示1)
----------web.xml
- <?xmlversion="1.0"encoding="UTF-8"?>
- <web-appxmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
- display-name>firstDWR</>
- welcome-file-listwelcome-file>index.html <!--TheDWRServlet...-->
- servlet>DWRServletservlet-name>dwr-invokerservlet-class>org.directwebremoting.servlet.DwrServlet <!--初始化参数,增加调试功能-->
- init-paramparam-name>debugparam-value>true<!--跨域调用配置信息,不是必须的-->
- >crossDomainSessionSecurity>false<!--下面是comet模式的反向Ajax所需要的参数-->
- >activeReverseAjaxEnabledservlet-mappingurl-pattern>/dwr/*web-app>
dwr.xml
copy