Can you please let me know how do I pass the value of one field(i.e the input value entered by user for a particular field ) as the value for a hidden field in jsp.
JavaScript is not necessary. Simply use an EL expression (with <c:out> if encoding is needed) to emit the value as the value attribute of the hidden element.