SSH与DWR结合问题
SSH与DWR结合问题
访问http://localhost:8080/shop/dwr/index.html它后
HTTP Status 404 - There is no Action mapped for namespace / and action name dwr.
--------------------------------------------
type Status report
message There is no Action mapped for namespace / and action name dwr.
description The requested resource is not available.
--------------------------------------------
Apache Tomcat/7.0.35
这是为什么呢?
------解决方案--------------------web.xml里面配置
<servlet>
<servlet-name>dwr</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>classes</param-name>
<param-value>java.lang.Object</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
------解决方案--------------------http://blog.csdn.net/zuxianghuang/article/details/7376247
有demo
------解决方案--------------------<param name="beanName" value="dwrInvokeDataAction"/>value应该是完整路径,包含包名
------解决方案--------------------这个问题我前两天遇到了,测试的时候可以显示值,但是页面运行的时候不会弹出值, 就是路径问题
<script type="text/javascript" src="<%=path%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=path%>/dwr/interface/helloDwr.js"></script>