atitit.ajax bp dwr 3.的注解方式配置使用流程总结.....

1. 下载  dwr.jar 1M 1

2. 配置注解方式..web.xml 1

3. Class 配置 2

4. 测试查看公布的方法 2

5. 导入到page页面 3

6. 使用在js黑头 3

7. #=====param sh requesst 3

8. Xxx is undefine 4

9. Warning: overloaded methods are not recommended 4

1. 下载  dwr.jar 1M

Development Release: Version 3 release candidate 2 (3.0 RC2)

2. 配置注解方式..web.xml

<!-- o71 -->

<servlet>

<display-name>DWR Servlet</display-name>

<servlet-name>dwr-invoker</servlet-name>

<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>

<init-param>

<param-name>debug</param-name>

<param-value>true</param-value>

</init-param>

<init-param>

<param-name>allowImpossibleTests</param-name>

<param-value>true</param-value>

</init-param>

<!-- 将设定注解的域对象和业务实现类放在下面列表中,中间使用逗号间隔 -->

<init-param>

<param-name>classes</param-name>

<param-value>

com.focustar.service.AwdSvs_shake_Perdaymode

</param-value>

</init-param>

</servlet>

<servlet-mapping>

<servlet-name>dwr-invoker</servlet-name>

<url-pattern>/dwr/*</url-pattern>

</servlet-mapping>

作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: http://blog.csdn.net/attilax

3. Class 配置

@RemoteProxy(name="AwdSvs_shake_PerdaymodeProx")

public class AwdSvs_shake_Perdaymode

//   下午5:31:28 2014-7-2  老哇的爪子  Attilax

@RemoteMethod public String leftNum_noReq(String uid, String actid) {

4. 测试查看公布的方法

http://192.168.1.63/weixin/dwr/index.html

Modules known to DWR:

· AwdSvs_shake_PerdaymodeProx(NewCreator for com.focustar.service.AwdSvs_shake_Perdaymode)

点击类k能看到方法一瓦...能单个的方法测试了...stub已经ok兰...

查看详细调用参数,能不个js下载哈来..不个http://192.168.1.63/weixin/dwr/interface/AwdSvs_shake_PerdaymodeProx.js下载哈来..

5. 导入到page页面

Source code 查看...

复制..

<script type='text/javascript' src='/weixin/dwr/engine.js'></script>

<script type='text/javascript' src='/weixin/dwr/interface/AwdSvs_shake_PerdaymodeProx.js'></script>

<script type='text/javascript' src='/weixin/dwr/util.js'></script>

6. 使用在js黑头

AwdSvs_shake_PerdaymodeProx.startDraw_noreq( openid,actid,   function(data)

{

//alert(data);

//var data_json=eval(data);

var data_json = eval("(" + data + ")");

//     alert(data_json.code);

drawAftEvent(data_json);

}

);

7. #=====param sh requesst

不个http://192.168.1.63/weixin/dwr/interface/AwdSvs_shake_PerdaymodeProx.js下载哈来..

/**

* @param {function|Object} callback callback function or options object

*/

p.leftNums = function(callback) {

return dwr.engine._execute(p._path, 'AwdSvs_shake_PerdaymodeProx', 'leftNums', arguments);

};

直接传callback走ok兰...

子能不个哪rewrite兰,不个参数直接传类k...

8. Xxx is undefine

Thourng yeu trace l ,走十不晓得为什么trace 不的上去....大概太深的兰吧...

原来的是js能直接显示拉李undefine...

只好ff黑头step 调试..还凑火,能调试了.林吧...

9. Warning: overloaded methods are not recommended

Javascript does not support overloaded methods, so the javascript file generated from this class will contain two methods the second of which will replace the first. This is probably not what you wanted.

It is best to avoid overloaded methods when using DWR.

3.

atitit.ajax bp dwr 3.的注解方式配置使用流程总结.....的更多相关文章

  1. atitit.ajax bp dwr 3.的注解方式配置使用流程总结 VO9o.....

    atitit.ajax bp dwr 3.的注解方式配置使用流程总结 VO9o..... 1. 安装配置 1 1.1. 下载  dwr.jar 1M 1 1.2. 配置注解方式..web.xml 1 ...

  2. atitit.ajax bp dwr 3.该票据安排使用的流量汇总 VO9o.....

    atitit.ajax bp dwr 3.该票据安排使用的流量汇总 VO9o..... 1. 安装配置 1 1.1. 下载  dwr.jar 1M 1 1.2. 配置注解方式..web.xml 1 2 ...

  3. SSH深度历险(十) AOP原理及相关概念学习+AspectJ注解方式配置spring AOP

    AOP(Aspect Oriented Programming),是面向切面编程的技术.AOP基于IoC基础,是对OOP的有益补充. AOP之所以能得到广泛应用,主要是因为它将应用系统拆分分了2个部分 ...

  4. Spring Aop实例@Aspect、@Before、@AfterReturning@Around 注解方式配置

    用过spring框架进行开发的人,多多少少会使用过它的AOP功能,都知道有@Before.@Around和@After等advice.最近,为了实现项目中的输出日志和权限控制这两个需求,我也使用到了A ...

  5. 跟着刚哥学习Spring框架--通过注解方式配置Bean(四)

    组件扫描:Spring能够从classpath下自动扫描,侦测和实例化具有特定注解的组件. 特定组件包括: 1.@Component:基本注解,识别一个受Spring管理的组件 2.@Resposit ...

  6. SpringMVC的注解方式配置

    SpringMVC支持使用注解方式配置,比配置文件方式更加灵活易用,是SpringMVC使用的主流模式. 1.在配置文件中开启SpringMVC的注解 <!-- 开启包扫描 --> < ...

  7. spring学习笔记 星球日two - 注解方式配置bean

    注解要放在要注解的对象的上方 @Autowired private Category category; <?xml version="1.0" encoding=" ...

  8. Spring框架学习(6)使用ioc注解方式配置bean

    内容源自:使用ioc注解方式配置bean context层 : 上下文环境/容器环境 applicationContext.xml 1 ioc注解功能 注解 简化xml文件配置 如 hibernate ...

  9. Spring boot 基于注解方式配置datasource

    Spring boot 基于注解方式配置datasource 编辑 ​ Xml配置 我们先来回顾下,使用xml配置数据源. 步骤: 先加载数据库相关配置文件; 配置数据源; 配置sqlSessionF ...

随机推荐

  1. scala 学习: 逆变和协变

    scala 逆变和协变的概念网上有很多解释, 总结一句话就是 参数是逆变的或者不变的,返回值是协变的或者不变的. 但是为什么是这样的? 协变: 当s 是A的子类, 那么func(s) 是func(A) ...

  2. ssh 互通脚本

    实现了 主机到指定机器的ssh免密码登录. 若要实现互通, 则在机器列表的每台机器上执行该脚本. 192.168.1.22 root test 192.168.1.25 root test 192.1 ...

  3. LeetCode OJ 147. Insertion Sort List

    Sort a linked list using insertion sort. Subscribe to see which companies asked this question 解答 对于链 ...

  4. 对div作用域的理解

    若想要div的height起作用,则要保证它上面的层的height也是有用的,如上图

  5. 02-JAVA中的基本语法

    第一个动手动脑: 首先用枚举类型定义两个变量,然后判断两个变量是否引用同一对象,在判断枚举类型是否是原始数据类型,再从字符串中转换,最后列出所有的对象. 很明显,这两个变量都是枚举类型,但是这两个变量 ...

  6. sublime text保存时删除行尾空格

    打开sublime text,点击在Preferences, Settings-User打开的用户配置中加入以下一行: "trim_trailing_white_space_on_save& ...

  7. BIEE 11g学习

    biee 11g学习1. 创建资料档案库文件(RPD)  文件数据库 1.1 创建数据源连接          运行Net Manager 用于BIEE的数据库服务 1.2 模型的建立   1.运行o ...

  8. vs代码段快捷键设置

    1 工具->代码段管理器

  9. android 区分wifi是5G还是2.4G

    http://bbs.csdn.net/topics/391033966?page=1 我一开始看这帖子,找不到答案,为了后来的人,我来回复吧.WifiManager wifiManager = (W ...

  10. 数据模型类对比 反射c#

    using System;using System.ComponentModel.DataAnnotations; public class LoginModel    {               ...