jsp,mysql,tomcat配置的系统,用的时候出错了,高人帮忙指点一下~~谢谢! 20
我在网上下了一个系统,jdk,tomcat都配置正确,没有问题,jdbc不知道该怎么配置,网上找了些也不知道对不对,然后就打开页面,login.jsp显示没有问题,但是点...
我在网上下了一个系统,jdk,tomcat都配置正确,没有问题,jdbc不知道该怎么配置,网上找了些也不知道对不对,然后就打开页面,login.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: 48 in the jsp file: /CheckUser.jsp
The method getMessage() is undefined for the type CheckUser
45: <jsp:setProperty name="login" property="password" value="<%=password%>"/>
46:
47: <%
48: message=login.getMessage();//获取返回的验证信息
49: if (message==null) message="";
50: }
51: %>
An error occurred at line: 60 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
57:
58: if(logrole.equals("teacher")){
59:
60: session.setAttribute("teacherID",login.getID() );
61: //String questions=response.encodeUrl();
62: response.sendRedirect("teacher/index-frames.jsp");
63: }
An error occurred at line: 66 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
63: }
64: else if(logrole.equals("student")){
65:
66: session.setAttribute("studentID",login.getID());
67: //String questions=response.encodeUrl();
68: response.sendRedirect("student/mainpage/index-frames.jsp");
69: }
An error occurred at line: 72 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
69: }
70: else if(logrole.equals("admin")){
71:
72: session.setAttribute("adminID",login.getID() );
73: //String questions=response.encodeUrl();
74: response.sendRedirect("admin/index-frames.jsp");
75:
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:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:319)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
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:321)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.29 logs. 展开
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: 48 in the jsp file: /CheckUser.jsp
The method getMessage() is undefined for the type CheckUser
45: <jsp:setProperty name="login" property="password" value="<%=password%>"/>
46:
47: <%
48: message=login.getMessage();//获取返回的验证信息
49: if (message==null) message="";
50: }
51: %>
An error occurred at line: 60 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
57:
58: if(logrole.equals("teacher")){
59:
60: session.setAttribute("teacherID",login.getID() );
61: //String questions=response.encodeUrl();
62: response.sendRedirect("teacher/index-frames.jsp");
63: }
An error occurred at line: 66 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
63: }
64: else if(logrole.equals("student")){
65:
66: session.setAttribute("studentID",login.getID());
67: //String questions=response.encodeUrl();
68: response.sendRedirect("student/mainpage/index-frames.jsp");
69: }
An error occurred at line: 72 in the jsp file: /CheckUser.jsp
The method getID() is undefined for the type CheckUser
69: }
70: else if(logrole.equals("admin")){
71:
72: session.setAttribute("adminID",login.getID() );
73: //String questions=response.encodeUrl();
74: response.sendRedirect("admin/index-frames.jsp");
75:
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:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:319)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
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:321)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:257)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.29 logs. 展开
展开全部
你的request里面应该放了一个名为:login的CheckUser类型的变量吧。你查看一下,CheckUser.java这个类中,没有getID()这个方法。自己看一下是不是方法名有误,或者,没有创建。
如果还是有问题,那咱们再继续讨论。
如果还是有问题,那咱们再继续讨论。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
login这个对象似乎来历不明哈…… 可能是JavaBean解析时发生错误。也就是说,login对象不存在某个方法,但是你调用了它,而出现了这个错误。
先确定一下login是否正确实例化了。
先确定一下login是否正确实例化了。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没法改,你还是换一个模版吧。
The method getMessage() is undefined for the type CheckUser
The method getID() is undefined for the type CheckUser
大部分都是在说CheckUser找不到定义的方法.
The method getMessage() is undefined for the type CheckUser
The method getID() is undefined for the type CheckUser
大部分都是在说CheckUser找不到定义的方法.
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
48 in the jsp file: /CheckUser.jsp
这不都告诉你哪错了吗
这不都告诉你哪错了吗
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询