当前位置: 代码迷 >> Java Web开发 >> 关于有关问题:The value for the useBean class attribute test.textcounter is invalid
  详细解决方案

关于有关问题:The value for the useBean class attribute test.textcounter is invalid

热度:373   发布时间:2016-04-17 16:12:19.0
关于问题:The value for the useBean class attribute test.textcounter is invalid.
jsp初学者,我实在找不出错在哪。请牛人指点!!


pe   Exception   report

message

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

exception

org.apache.jasper.JasperException:   /textcounter.jsp(9,0)   The   value   for   the   useBean   class   attribute   test.textcounter   is   invalid.
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.visit(Generator.java:1200)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1155)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Generator.generate(Generator.java:3394)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

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


------解决方案--------------------
class= "test.textcounter "下面有textcounter类吗??你是package count;呀
<jsp:useBean id= "textcounter " class= "test.count.textcounter " scope= "application " />

------解决方案--------------------
test/count目录下 textcounter.java 和textcounter.class
---------------------
你的JAVABEAN是放在 test/count目录下的
而你的调用JAVABEAN这样写 <jsp:useBean id= "textcounter " class= "test.textcounter " scope= "application " /> 当然找不到textcounter

把class= "test.textcounter " 改成 class= "test.count.textcounter "
代码迷推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.daimami.com/search?q=317
  相关解决方案