Hi can somebody help me i am new to developing. ADD the new record to the existing database table at the end of all rows.Something like registration form details.

<%@page import="java.sql.*" %>

String fisname=request.getParameter("firstname");
String lstname=request.getParameter("lastname");
String sex=request.getParameter("gender");
    Connection con=DriverManager.getConnection("jdbc:odbc:Bharath");
    Statement st=con.createStatement();
    DataInputStream din=new DataInputStream(System.in);
        int count=st.executeUpdate("insert into registeredusers values('"+firstname+"','"+lastname+"','"+gender+"')");
            out.println("Records Entered Successfully");
            out.println("Insertion Failed");
catch(Exception e)

Connecting to DB with use of JSP is old fashioned and should not be used any more. So if you wish to interact with DB you should use JSP page with form for data entry, then pass it to servlet that will store data in DB and then to progress to futher action. Data validation can be done on JSP or servlet depends on your requirements and your abilities. For some tutorials you should check Sun website or see these tutorials