我在jsp上使用usebean标签,但即使我已经完成了所有可能的最佳解决方案,我也会遇到以下错误。可以任何一个帮助错误如下
输入例外报告
message /index.jsp (line: 1, column: 1) The value for the useBean
class attribute org.deepak.my is invalid.
description The server encountered an internal error that prevented
it from fulfilling this request.
例外
org.apache.jasper.JasperException: /index.jsp (line: 1, column: 1)
The value for the useBean class attribute org.deepak.my is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:291)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1379)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1187)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2450)
org.apache.jasper.compiler.Node$Root.accept(Node.java:471)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
org.apache.jasper.compiler.Generator.generate(Generator.java:3668)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:252)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:333)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:600)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
注意Apache Tomcat / 9.0.0.M17日志中提供了根本原因的完整堆栈跟踪。
答案 0 :(得分:0)
如果出现以下情况,请在下面的语句中尝试输入而不是类: -
<jsp:useBean id="my" class="org.deepak.my" />
在发布问题之前尝试在SO上找到答案,请参阅@BalusC提供的Answer,它将帮助您解决问题。