Hi Saravanan , The classes in <jsp:useBean> must always be with in a package.I am assuming you have kept the file "dbConnection" under the "src" directory. Try placing it under a package under "src" directory. eg : src/mypackage/dbConnection.class and dont forget to put the "package mypackage;" in the dbConnection.java!!
Also there are chances for a NullPointerException at "if ((username.length()>0) && (password.length()>0))" replace with (username!= null && password != null )