Myeclipse出现500错误

Hxyakian 2009-03-16 12:54:11
以下是我程序出现的问题,请教大虾们帮忙解决下
org.apache.jasper.JasperException: Unable to compile class for JSP:


An error occurred at line: 6 in the generated java file
Only a type can be imported. org.zlj.zxcs.dao.ExamDAO resolves to a package


An error occurred at line: 7 in the generated java file
Only a type can be imported. org.hibernate.Session resolves to a package


An error occurred at line: 8 in the generated java file
Only a type can be imported. org.zlj.zxcs.util.HibernateUtil resolves to a package


An error occurred at line: 9 in the generated java file
Only a type can be imported. org.zlj.zxcs.util.ParamUtil resolves to a package

An error occurred at line: 16 in the jsp file: /STUDENT/examAct.jsp
Session cannot be resolved to a type
13:
14:
15: <%
16: Session s=HibernateUtil.openSession();
17: ExamDAO obj=new ExamDAO(s,request);
18: String action=ParamUtil.getParam(request,"actionType","");
19:


An error occurred at line: 16 in the jsp file: /STUDENT/examAct.jsp
HibernateUtil cannot be resolved
13:
14:
15: <%
16: Session s=HibernateUtil.openSession();
17: ExamDAO obj=new ExamDAO(s,request);
18: String action=ParamUtil.getParam(request,"actionType","");
19:


An error occurred at line: 17 in the jsp file: /STUDENT/examAct.jsp
ExamDAO cannot be resolved to a type
14:
15: <%
16: Session s=HibernateUtil.openSession();
17: ExamDAO obj=new ExamDAO(s,request);
18: String action=ParamUtil.getParam(request,"actionType","");
19:
20: if(action.equals("reg")) {//注册考试


An error occurred at line: 17 in the jsp file: /STUDENT/examAct.jsp
ExamDAO cannot be resolved to a type
14:
15: <%
16: Session s=HibernateUtil.openSession();
17: ExamDAO obj=new ExamDAO(s,request);
18: String action=ParamUtil.getParam(request,"actionType","");
19:
20: if(action.equals("reg")) {//注册考试


An error occurred at line: 18 in the jsp file: /STUDENT/examAct.jsp
ParamUtil cannot be resolved
15: <%
16: Session s=HibernateUtil.openSession();
17: ExamDAO obj=new ExamDAO(s,request);
18: String action=ParamUtil.getParam(request,"actionType","");
19:
20: if(action.equals("reg")) {//注册考试
21:


An error occurred at line: 22 in the jsp file: /STUDENT/examAct.jsp
ParamUtil cannot be resolved
19:
20: if(action.equals("reg")) {//注册考试
21:
22: Integer intId=ParamUtil.getIntParam(request,"intId",0);
23: obj.add(intId);
24: HibernateUtil.closeSession();
25: response.sendRedirect("examList.jsp");


An error occurred at line: 24 in the jsp file: /STUDENT/examAct.jsp
HibernateUtil cannot be resolved
21:
22: Integer intId=ParamUtil.getIntParam(request,"intId",0);
23: obj.add(intId);
24: HibernateUtil.closeSession();
25: response.sendRedirect("examList.jsp");
26: }
27: else if(action.equals("start")) {//进入考试


An error occurred at line: 29 in the jsp file: /STUDENT/examAct.jsp
ParamUtil cannot be resolved
26: }
27: else if(action.equals("start")) {//进入考试
28:
29: Integer intId=ParamUtil.getIntParam(request,"intId",0);
30: obj.startExam(intId);
31: HibernateUtil.closeSession();
32: out.println("<script >top.location='examing.jsp?examId="+intId+"'; </script>");


An error occurred at line: 31 in the jsp file: /STUDENT/examAct.jsp
HibernateUtil cannot be resolved
28:
29: Integer intId=ParamUtil.getIntParam(request,"intId",0);
30: obj.startExam(intId);
31: HibernateUtil.closeSession();
32: out.println("<script >top.location='examing.jsp?examId="+intId+"'; </script>");
33:
34: }


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)

...全文
358 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
s_liangchao1s 2009-03-16
  • 打赏
  • 举报
回复
包的路径没引对
ouyangxiaokang6 2009-03-16
  • 打赏
  • 举报
回复
你程序的问题,你没有用ide开发吗?应该是你引入的问题。仔细检查一下。
mumu_java 2009-03-16
  • 打赏
  • 举报
回复
需要在jsp页面引入HibernateUtil这个类.

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧