我想使用Html,Jsp和java创建一个Web应用程序。我在eclipse kepler IDE中工作,并在我的PC上安装了Tomcat 7.0.34。我的项目属于" Dynamic Web Project"在我的构建路径中,我已经设置了mysql-connector-java-5.1.31-bin.jar
我的数据库位于AWS RDS上的MySQL中。当我将我的应用程序作为一个简单的Java应用程序运行时,我能够轻松地访问数据库"
但是当我尝试在Tomcat服务器上运行它时,我收到以下错误:
type Exception report
message An exception occurred processing JSP page /WelcomeCustomer.jsp at line 53
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 /WelcomeCustomer.jsp at line 53
50: @SuppressWarnings("resource")
51: Scanner sc = new Scanner(System.in);
52: String Cust_address, Cust_email, Cust_contact;
53: Connection con = DriverManager.getConnection( host, uName, uPass );
54:
55: //View all shops
56: Statement stmt5 = con.createStatement();
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:5 68)
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:728)
root cause
javax.servlet.ServletException: java.sql.SQLException: No suitable driver found for jdbc:mysql://myAWS_URL org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:912)
请帮忙 提前谢谢。