日期:2014-05-18  浏览次数:20691 次

JSP运行出错提示,请帮忙分析
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: Unable to compile class for JSP

An error occurred at line: 7 in the jsp file: /getStudent.jsp
student cannot be resolved to a type
4: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
5: <title>学生</title>
6: </head>
7: <jsp:useBean id="student" scope="page" class="student"/>
8: <body bgcolor="#0099FF" text="#FFFFFF" link="#33FF00">
9: <p>
10: <%


An error occurred at line: 7 in the jsp file: /getStudent.jsp
student cannot be resolved to a type
4: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
5: <title>学生</title>
6: </head>
7: <jsp:useBean id="student" scope="page" class="student"/>
8: <body bgcolor="#0099FF" text="#FFFFFF" link="#33FF00">
9: <p>
10: <%


An error occurred at line: 7 in the jsp file: /getStudent.jsp
student cannot be resolved to a type
4: <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
5: <title>学生</title>
6: </head>
7: <jsp:useBean id="student" scope="page" class="student"/>
8: <body bgcolor="#0099FF" text="#FFFFFF" link="#33FF00">
9: <p>
10: <%


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
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.



------解决方案--------------------
jsp里的代码写的有错误,发出来看看
------解决方案--------------------
<jsp:useBean id="student" scope="page" class="student"/> 
这个student包存在吗,也没有Import进来?
------解决方案--------------------
<jsp:useBean id="student" scope="page" class="student"/> 
class要指包名。
------解决方案--------------------
你的student没有import进来
------解决方案--------------------
探讨

student 是放在WEB-INFO\classes目录的根目录下的。

------解决方案--------------------
貌似s