So I took the effort of looking through your code.
Are you using a proper IDE? Does not look like.
PLEASE USE ECLIPSE OR NETBEANS.
Both are free. Both would have told you about the mess you're creating.
public class dbsrv extends HttpServlet{
public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletExcepton,IOException{
Connection con;
PreparedStatement ps;
public void init(){
}
}
}