I am using the ajaxForm plugin found here
Now i have a form with username & password
My requirement is
You need to change your beforeSubmit function to this:
beforeSubmit : function(arr, $form, options){
arr.push({name:'hashed-password', value:$.md5($('#password').val())})
},
Then you can access the hashed-password variable in your servlet.
The reason for this is that the value from the text input has already been processed by AjaxForm and stored in the arr array.
Edit: if you don't want to send the plaintext password, you can use your original method but change beforeSubmit : function(arr, $form, options){
to beforeSerialize : function() {