当前位置: 代码迷 >> Java相关 >> tomcat5.5.20下运行struts1.1出现有关问题
  详细解决方案

tomcat5.5.20下运行struts1.1出现有关问题

热度:6962   发布时间:2013-02-25 21:51:25.0
tomcat5.5.20下运行struts1.1出现问题
HTTP Status 500 - 

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

type Exception report

message 

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

exception 

org.apache.jasper.JasperException: /login.jsp(10,0) Unable to find setter method for attribute: lang
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2722)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2875)
org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2188)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1686)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2222)
org.apache.jasper.compiler.Node$Root.accept(Node.java:457)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166)
org.apache.jasper.compiler.Generator.generate(Generator.java:3321)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.

是什么问题,怎样解决,谢谢。


------解决方案--------------------------------------------------------
这个错误的意思是
你页面上有个属性,name是lang,但是你和这个页面对应的form类中,没有这个属性,或者说没有这个lang属性对应的set、get方法