This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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 )