当前位置:   article > 正文

DWR 实现数据实时刷新_dwr刷新

dwr刷新

       DWR技术是基于AJAX的,在我的理解里,它也算是ajax的一种变形,实现了java 和javascript 之间的一种实时通信。

准备工作:

1.dwr的相关jar包,这里我用的是dwr3.0. 还有dwr依赖的包:Commons Logging jar

2.配置Dwr,在web.xml里面添加dwr的支持:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  <display-name>DwrDemo</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <listener>
    <listener-class>org.directwebremoting.servlet.DwrListener</listener-class>
  </listener>
  <servlet>
   

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/459240
推荐阅读
相关标签
  

闽ICP备14008679号