关于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( );
   

猜你喜欢

转载自blog.csdn.net/antfit/article/details/7091690