Topic: 请教一个关于JSP调用BEAN出错的问题! |
Print this page |
1.请教一个关于JSP调用BEAN出错的问题! | Copy to clipboard |
Posted by: tsizhao Posted on: 2006-04-06 17:07 问题是这样的。我用MyEclipse+Tomcat建一个J2EE工程,一个JAVABEAN,再有几个JSP页面,在一个JSP页面里调用BEAN时,总是出现如下错误:(Bean在单独测试是正确的。) type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: /log/web/log_cm.jsp(27,4) The value for the useBean class attribute com.tsizhao.LogBean is invalid. org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:150) org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1227) 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:3272) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244) org.apache.jasper.compiler.Compiler.compile(Compiler.java:470) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 我的JSP页面调程序: <body> <jsp:useBean id="handle" class="com.tsizhao.LogBean" scope="request"> <jsp:setProperty name="handle" property="*"/> </jsp:useBean> <% if (handle.validate()){ %> <jsp:forward page="success.jsp"></jsp:forward> <%} else{ %> <jsp:forward page="relog.jsp"></jsp:forward> <%}%> </body> 被这个问题烦了好久了,,都解决不了。。请知道的指点一下,是不是Eclipse或是Tomcat需要配置什么的呢? |
2.Re:请教一个关于JSP调用BEAN出错的问题! [Re: tsizhao] | Copy to clipboard |
Posted by: andylhs Posted on: 2006-04-17 15:20 BEAN要实例化 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |