struts开发中一些常见的问题_JAVA_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > JAVA > struts开发中一些常见的问题

struts开发中一些常见的问题

 2011/11/4 8:11:19  j2ee_zhongqi  http://j2ee-zhongqi.iteye.com  我要评论(0)
  • 摘要:转载自:http://yuxuan2029.blog.163.com/blog/static/194615336201151911314916/壹javax.servlet.ServletException:Request[/yhb]doesnotcontainhandlerparameternamed'method'.Thismaybecausedbywhitespaceinthelabeltext.解决:form表单中缺少提交方法method=post/get貳java.lang
  • 标签:问题 开发 struts
转载自:http://yuxuan2029.blog.163.com/blog/static/194615336201151911314916/

壹 javax.servlet.ServletException:
Request[/yhb] does not contain handler parameter named 'method'.   This may be caused by whitespace in the label text.
解决:form表单中缺少提交方法method=post/get

貳 java.lang.ClassCastException: [Ljava.lang.Object;
at com.carry.service.impl.YhbManagerImpl.loginCheck(YhbManagerImpl.java:44)
javax.servlet.ServletException:
Could not open Hibernate Session for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Cannot open connection
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference
解决办法:内存溢出,重新启动服务器

叁 METHOD 传参数方法找不到,ACTION中,方法的四个参数顺序不能颠倒
tsList(ActionMapping mapping,ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)throws Exception

肆  异常:不能连接数据库
(解决:数据库连接不上,连接异常,1,检查网络连接,2,检查是否有连接驱动,)
Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Io 异常: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=150999297)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4)))))
连接拒绝

伍 [SettingsFactory] Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory
(Io 异常: The Network Adapter could not establish the connection)
网络适配器不能建立连接,ORACLE数据库服务器没有打开

java.io.IOException: tmpFile.renameTo(classFile) failed
解决:JSP文件中有不能运行的JAVA代码!

陆 Unable to find a value for "id" in object of class "java.lang.String" using operator "."
解决:<c:forEach var="fun" items="${listFun}"><c:forEach> 中的items="${listFun}" 错写为items="listFun"

柒 Illegal use of &lt;when&gt;-style tag without &lt;choose&gt; as its direct parent
"${map.yuanYouPur='yuanYouPur'}" contains invalid expression_r(s): javax.servlet.jsp.el.ELException: Encountered "=", expected
one of ["}", ".", ">", "gt", "<", "lt", "==", "eq", "<=", "le", ">=", "ge", "!=", "ne", "[", "+", "-", "*", "/", "div", "%",
"mod", "and", "&&", "or", "||", "?"]
解决:JSTL语言表达使用错误

扒  The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value
cannot be converted to an integer.
解决:JSP页面中,用‘ ${} ’输出获得的对象的属性,使用错误,例如返回LIST数组,其中存的对象是OBJ(页面中可以定义变量obj代表一个OBJ),取OBJ的属性 AGE,NAME,   应该是${obj.age} ${obj.name}即可获得OBJ的AGE和NAME属性值,检查在使用${}的地方${obj.age} ${obj.name}是否正确,

玖 不能正常打开JSP文件! 
enough of enjoyment and comfort
Unable to create this part due to an internal error. Reason for the failure: Widget is disposed
org.eclipse.swt.SWTException: Widget is disposed
解决方法: 
    1 到window-preference-general-editors-file associations下看看你的*.html默认打开方式是什么。
     你改成myeclipse html editor就能打开了。
    2 问题已经解决,这应该是MyEclipse5.0M2的一个bug,8月11号新发布的版本5.0.1GA已经修复了此bug
发表评论
用户名: 匿名