首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

JSP运行出错提示,请帮忙分析,该怎么解决

2013-09-11 
JSP运行出错提示,请帮忙分析HTTP Status 500 -type Exception reportmessagedescription The server encou

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目录的根目录下的。

[解决办法]
貌似student类中缺少mark属性
[解决办法]
<jsp:useBean id="student" scope="page" class="student"/> 


放错位置了吧,放到<head></head>里面可能会好。。。
[解决办法]
import 是放最外面的吧。。。没有import
[解决办法]
看代码没发现什么错误,
你先确定一下在WEB-INFO\classes根目录下有没有生成student.class。
[解决办法]
<jsp:useBean id="student" scope="page" class="student"/> 
你把id="student" 改成id=“XXXXXX” XXXXXX只要不是student就行
记得jsp页面里调用类方法的地方,也要把student改成XXXXXX啊
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html

热点排行