首页 > 其他分享 >exception: cannot find actionmappings or actionformbeans collection

exception: cannot find actionmappings or actionformbeans collection

时间:2023-04-14 12:03:25浏览次数:30  
标签:xml actionformbeans struts jar exception collection jarcommons 版本


多种情况会导致这个问题,但大致就是以下几种情况:

 

1。Web.xml未初始化问题

少了一个<load-on-startup>0</load-on-startup>

这样开始是没有加载这个类,就没有初始化struts-config.xml,所以找不到

actionmappings or actionformbeans collection。

 

2。struts-config.xml问题

 

3。jar包不全或版本不对

也有可能导致这个问题,从stuts例子里面拷过来就好了。struts1.1自带共10个jar包。

 

4。编译问题

有可能Action和Formbean没有编译,也会有这个问题,检查一下有没有对应的class文件就好。class路径不对可能也会导致这个问题。

 

5。版本问题

用的servlet容器和struts版本不对或这两个版本协调有问题。

在以上几条都不能解决问题的情况下,可能就是版本的问题了,换个高版本试试吧

 

 

Cannot find ActionMappings or ActionFormBeans collection的错误调试

 

今天在做struts的连接试验,结果配置完成之后发现调不通,运行之后,出现错误:

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection

反复修改web.xml 和 struts-config.xml 无果。

确定配置没错之后,从其他方面找原因。

最后发现,类库中jar包不全,于是将

commons-beanutils.jar

commons-collections.jar

commons-dbcp.jar

commons-digester.jar

commons-fileupload.jar

commons-lang.jar

commons-pool.jar

commons-resources.jar

commons-validator.jar

拷入lib中,问题得到解决,并调试通过

标签:xml,actionformbeans,struts,jar,exception,collection,jarcommons,版本
From: https://blog.51cto.com/u_16070335/6189853

相关文章