struts报错和解决方法

类别:Java 点击:0 评论:0 推荐:

以下是我在学习struts过程中遇到的问题和解决方法,希望对你有所帮助。

问题一:javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection
解决方法:
没有在WEB-INF/lib/目录下加入必要的jar文件,也就是必要的jar文件找不到,注意classpath。例如:
commons-beanutils.jar
commons-collections.jar
commons-digester.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
还可能是因为struts-config.xml里面的语法错误,也会导致这类错误。

 


问题二:org.apache.jasper.JasperException: /onwer.jsp(18,17) According to the TLD attribute property is mandatory for tag select
解决方法:
<html:select>语法错误。我的错误是<html:select>还没结束,就写了结束符号/

 

问题三:javax.servlet.ServletException: Cannot retrieve mapping for action /onwer
解决方法:
struts-config.xml语法错误,请仔细检查和/onwer相关的地方。

 

问题四:
javax.servlet.ServletException: Exception creating bean of class com.asprise.struts.form.OwnerForm: {1}
Error creating form bean of class com.asprise.struts.form.OwnerForm
java.lang.ClassNotFoundException: com.asprise.struts.form.OwnerForm
解决方法:
没有找到相关的class。

本文地址:http://com.8s8s.com/it/it12900.htm