日期:2014-05-16  浏览次数:20705 次

Exception creating bean of class org.apache.struts.action.DynaActionForm: {1}

在使用动态form的时候,我们有时候会遇到以下异常:

?

HTTP Status 500 -

--------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Exception creating bean of class org.apache.struts.action.DynaActionForm: {1}

?

?

?

其原因主要是因为没找到form, struts-config.xml或者struts.xml里form和form类名不一致。

?

但笔者在开发的过程中发现,出现这种异常,除了struts-config.xml里form和form类名不一致 这种情况外,还有另外一个原因,就是我们在 struts-config.xml 文件中(form-beans 种) 添加了一个 bean 后,然后没有再对它进行操作,导致其他的动态form也用不了,出现同样异常。 简而言之,struts-config.xml配置中多了个没用的bean。

?

这是我开发中遇到的,至于深层次的原因我也不明白,感觉存在的很合理却导致异常,bug也许。

?

?


我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html