Hai I had the requirement to store the password in encrypted form in the database when we enter some username and passowrd in the html form .And the method to decrypt the password to check for validation using Java
Sounds like you need to read up on the java.security.* packages. If you read those JavaDocs there are quite a few links to useful related documentation.