title: How to connect Database driver to android studio.?
body: <p>As we know that Google has deprecated some old features for database implementations in new android SDK, also added new features. So I want develop one small app to display content of database using servlet.
  In android studio, I've created on AppEngine servlet module through which I want to access my database built in PhpMyAdmin. I'm not able to get connection to that databse here.Right Now, by using below code, I'm printing output on browser window.
  So Anyone knows how to get connection to the database in this new feature.?</p>
  
  <pre><code>package com.example.Nirmal.myapplication.backend;
  
  import java.io.IOException;
  import javax.servlet.http.*;
  import java.sql.*;
  import java.io.PrintWriter;
  
  public class MyServlet extends HttpServlet {
  @Override
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
          throws IOException {
      PrintWriter out = resp.getWriter();
      /*resp.setContentType("text/plain");
      resp.getWriter().println("Please use the form to POST to this url");*/
      try  {
          //Class.forName("com.mysql.jdbc.Driver");
  
          Connection con=DriverManager.getConnection(
                  "jdbc:mysql://localhost:3306/gaming_hub","root","");
          out.println("here");
          String sql="SELECT * from games";
          PreparedStatement ps=con.prepareStatement(sql);
          ResultSet rs=ps.executeQuery();
  
          // DataOutputStream dout=new DataOutputStream();
          while(rs.next())
          {
              out.println(rs.getString(1));
          }
  
      }catch (Exception e){
          out.println("Exception.....");
  
      }
  }
  
  @Override
  public void doPost(HttpServletRequest req, HttpServletResponse resp)
          throws IOException {
  
     }
  }
  </code></pre>