Swastik Dey wrote:. . . May be a method like the following might be helpful . . .
Maybe useful maybe not. The problem is that you now have two definitions of “empty”, one as in the String class and one here. The two are different; you have a definition of “empty” which includes null. That way lies confusion.
No exception this time, and my database connection is fine because, same connection code works on login page and only updation code is change this time, this preaparestmt code is right I think for updating the password, so m not sure why this not working..
name = " old_password" and the other two fields too. Probably due to this request.getParameter is not fetching the values, and this is a likely reason for nullpointerexception too that you were getting before.