---
title: "Cannot find ActionMappings or ActionFormBeans 错误解决"
author: "sunnylocus"
date: "2009-02-05T17:12:56Z"
tags: []
slug: "cannot-find-actionmappings-or-actionformbeans"
draft: false
lastmod: "2009-02-05T17:13:48Z"
id: 323567
url: "https://sunnylocus.iteye.com/blog/323567"
---

前几天部署在Tomcat 5.5容器里一个项目莫名其秒的出现错误，访问login.jsp登陆页面就会报    

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

从控制台日志发现只要服务器一启动，struts就会报两个错误![](/upload/picture/pic/30525/b50ce2fe-1a09-3f49-83b6-2f225f8235a9.jpg)

 

![](/upload/picture/pic/30523/d26e1d23-1ebe-3491-9a7b-a04ffe9d5f66.jpg)

**第一个错误不能连网或着找不到资源就会报这样的错误，Struts它要连接什么？做什么用的呢，这个问题想了一天，恍然大悟，在struts-config.xml 第一行是dtd声明**

 

**&lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config\_1\_2.dtd"&gt;**

**strtus会到[http://struts.apache.org/dtds/struts-config\_1\_2.dtd](http://struts.apache.org/dtds/struts-config_1_2.dtd)获得dtd文件，以此来验证struts-config.xml文件格式合不合法。**

 

**会不会因为这儿出了问题，换了个头如下：**

 

**&lt;!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config\_1\_1.dtd"&gt;**

 

**重启服务器，一切正常。不过倒现在我还是不明白，这个项目一直运行的好好的，而且服务器密码只有我和另一个同事知道，我们两个都没有改动，怎么突然出现了这个错误呢？今天见鬼了！！**