关于struts2.1.8 spring ibatis 与 dwr2的整合 遇到的问题


按照常规配置好ssi框架,再加入dwr2框架的以后,想要使用框架的帮助,进入

http://localhost:808/项目名称/dwr/index.html 以后能正确显示,如:

Classes known to DWR:

  • Validate  (com.vstsoft.action.Validate)

 

但是继续点击Validat会出现错误提示,如下:

HTTP Status 404 - There is no Action mapped for action name Validate.


type Status report

message There is no Action mapped for action name Validate.

description The requested resource (There is no Action mapped for action name Validate.) is not available.


Apache Tomcat/6.0.29              

 

百度了一下,得到相应的解决方法是:

将web.xml中关于struts的配置改成 *.action 而不是/*             

 

两外有高人也贴出解决方法:strust.xml中加上<constant name="struts.action.extension" value="action"></constant>,两个都行

 

得到正确的网页:      

Methods For: Validate (com.vstsoft.action.Validate)

To use this class in your javascript you will need the following script includes:

  <script type='text/javascript' src='/ssiTest/dwr/interface/Validate.js'></script>
  <script type='text/javascript' src='/ssiTest/dwr/engine.js'></script>

In addition there is an optional utility script:

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

Replies from DWR are shown with a yellow background if they are simple or in an alert box otherwise.
The inputs are evaluated as Javascript so strings must be quoted before execution.

There are 12 declared methods:

  • queryByName( );
   

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值