当前位置: 代码迷 >> Java Web开发 >> myeclipse连接sql 2005时出错,该怎么解决
  详细解决方案

myeclipse连接sql 2005时出错,该怎么解决

热度:5458   发布时间:2013-02-25 21:19:32.0
myeclipse连接sql 2005时出错
message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /personal.jsp at line 6

3: String path = request.getContextPath();
4: String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
5: %>
6: <jsp:useBean id="login" type="mybean.Login" scope="session"/>
7: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8: <html>
9: <head>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

javax.servlet.ServletException: java.lang.InstantiationException: bean login not found within scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840)
org.apache.jsp.personal_jsp._jspService(personal_jsp.java:140)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
root cause

java.lang.InstantiationException: bean login not found within scope
org.apache.jsp.personal_jsp._jspService(personal_jsp.java:76)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.27 logs.



------解决方案--------------------------------------------------------
<jsp:useBean id="login" type="mybean.Login" scope="session"/>
有错啊
------解决方案--------------------------------------------------------
<jsp:useBean class="mybean.Login" id="cont" scope="session"/>
是class,不是type
------解决方案--------------------------------------------------------
javax.servlet.ServletException: java.lang.InstantiationException: bean login not found within scope
bean login not found within scope
你没有在session里面设置login,自己看看啊。。。。
------解决方案--------------------------------------------------------
java.lang.InstantiationException: bean login not found within scope
org.apache.jsp.personal_jsp._jspService(personal_jsp.java:76)

到tomcat的 localhost的子目录中找到 personal_jsp.java ,看看76行
  相关解决方案
本站暂不开放注册!
内测阶段只得通过邀请码进行注册!
 
  • 最近登录:Fri Jul 20 13:07:05 CST 2018
  • 最近登录:Fri Jul 20 13:07:05 CST 2018
  • 最近登录:Fri Jul 20 13:07:05 CST 2018
  • 最近登录:Fri Jul 20 13:07:05 CST 2018
  • 最近登录:Fri Jul 20 13:07:05 CST 2018