java - Error trying to connect to MySQL Database in AWS RDS through tomcat server -
I want to create a web application using HTML, JSP and Java. I am working on Eclipse Kepler IDE and on my PC, Tomcat 7.0.34 is installed. My project is the type of "dynamic web project" and in my build path I have already set mysql-connector-java-5.1.31-bin.jar
My database is on AWS RDS in MySQL When I was running my application as a simple "Java application" then I was able to easily access the database
But when I tried to run it on the Tomcat server, I got the following error Is:
type exception report type message Switch to line occurred processing an exception JSP page / WelcomeCustomer.jsp 53 description The server encountered an internal error which prevented from fulfilling this request. Exception org.apache.jasper.JasperException: @SuppressWarnings ("Resource") 51: An exception line 53 occurred on the processing JSP page /WelcomeCustomer.jsp scanner SC = new scanner (System.in); 52: String Cust_address, Cust_email, Cust_contact; 53: Connection con = DriverManager.getConnection (host, uName, uPass); 54: 55: // See all shops 56: statement stmt5 = con.createStatement (); Staktrres: org.apache.jasper.servlet.JspServletWrapper.handleJspException (JspServletWrapper.java 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 JavaxkservletkServletException: Java .sql.SQLException: not find a suitable driver JDBC: mysql: // myAWS_URL org.apache.jasper.runtime.PageContextImpl.doHandlePageException (PageContextImpl.java:912)
Please help thanks in advance.
Comments
Post a Comment