将一个访问javabean的页面及其类放在tomcat\webapps\root\examples目录下,结果呢,出错了:
org.apache.jasper.JasperException: /examples/32702.jsp(5,0) The value for the useBean class attribute goods is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1223)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3270)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
难道访问javabean组件还要做额外的什么配置?
------解决方法--------------------------------------------------------
跟你的ActionForm对照一下,看看goods属性定义是否满足要求。
------解决方法--------------------------------------------------------
你指定的那个javaBean是不是没有goods属性?
错误提示很清楚嘛
------解决方法--------------------------------------------------------
The value for the useBean class attribute goods is invalid.
userBean的goods舒心是无效的
------解决方法--------------------------------------------------------
没有阿,定义的goods是一个bean类而不是属性!
而且偶尔有输出结果?