javax.servlet.servletexception: cannot find actionmappings or actionformbeans collection
有时候大家会可能碰到这一个错误吧..
看看你的web.xml中是不是有:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
</servlet>
比如是这样子的..
那么的话....就是少了一个:
<load-on-startup>0</load-on-startup>
因为你没有把org.apache.struts.action.ActionServlet给load进去的话..那么html:form action=””
就找不到相对应的那个action path了..
完整的应该是:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
这是我帮一朋友debug时发现在的...
本文地址:http://com.8s8s.com/it/it14052.htm