Hi I have created a simple **JSP** file to insert some data into **mysql database** , I have a **tomcat server** running in **localhost with port :9999** , but while running the JSP file it is showing some error , Can anybody help me to solve this , I have tried to run it on eclipse.

giving the error log below

**HTTP Status 500 - An exception occurred processing JSP page /registration.jsp at line 198**

---

type Exception report

message An exception occurred processing JSP page /registration.jsp at line 198

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 /registration.jsp at line 198

195: 
 196: PreparedStatement pstatement=null;
 197: 
 198: Class.forName("com.mysql.jdbc.Driver").newInstance();
 199: int updateQuery = 0;
 200:  

 201: try

**Stacktrace:**

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.ja  

 va: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:728)

**root cause** 

javax.servlet.ServletException: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.jav
 a:912)
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java: 
 841)
 org.apache.jsp.registration\_jsp.\_jspService(registration\_jsp.java:316)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
 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:728)

**root cause** 

java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:126)
 org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
 java.lang.Class.forName0(Native Method)
 java.lang.Class.forName(Unknown Source)
 org.apache.jsp.registration\_jsp.\_jspService(registration\_jsp.java:261)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
 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:728)