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 reportmessage There is no Action mapped for namespace / and action name dwr.description The requested resource is not available.
--------------------------------------------------------------------------------Apache Tomcat/7.0.35
这是为什么呢?
访问http://localhost:8080/shop/dwr/index.html它后
HTTP Status 404 - There is no Action mapped for namespace / and action name dwr.--------------------------------------------------------------------------------type Status reportmessage There is no Action mapped for namespace / and action name dwr.description The requested resource is not available.
--------------------------------------------------------------------------------Apache Tomcat/7.0.35
这是为什么呢?
<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>
有demo
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://getahead.org/dwr/dwr20.dtd">
<dwr>
<allow>
<create creator="spring" javascript="dwr" scope="session">
<param name="beanName" value="dwrInvokeDataAction"/>
</create>
</allow>
</dwr>
<script type="text/javascript" src="<%=path%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=path%>/dwr/interface/helloDwr.js"></script>