I like to run a servlet on a tomcat server but it gives the error as above.Also when i put ajax request on the servlet it did not working through index.jsp.Please help me friends.
also explain briefly because I am at the starting level of servlet.

```
       import java.sql.Connection;  
    java.sql.DriverManager;  
  import java.sql.ResultSet;  
   import java.sql.Statement;    
  import com.mysql.jdbc.Driver;
  import java.util.Arrays;
  import java.io.IOException;
     import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;

public class MySQLAccess  extends HttpServlet
 {  

    public void getRows(HttpServletRequest request, HttpServletResponse response)throws       IOException, ServletException
{
    String a="";
   PrintWriter out = response.getWriter(); 
    try 
       {  
        Class.forName("com.mysql.jdbc.Driver");  
        Connection connection = DriverManager.getConnection(  
                "jdbc:mysql://localhost:3306/sankar?" + "user=root");  
        Statement statement = connection.createStatement();  

        ResultSet resultSet = statement   
                .executeQuery("SELECT * FROM sankar.datas");  
       a=resultSet.getString("name");

        }  

     catch (Exception e) 
       {  
        e.printStackTrace();  
       } 

    out.println(a);  
}                           
}  

```