Sadique
Sadique

Reputation: 11

Need to pass value from a JSP

I'm using a JSP page which fetches details from MF and displays it. User has a option to edit those fields and save that back again to the Mainframe. The problem am facing is, once the user clicks the save button after editing, the edited values are not passing to the Handler(java file). I used getter method to populate the values in the start and am using the same method to save the edited values. Session can't be used as the user is editing the data in the current session.

Please help.

Upvotes: 0

Views: 106

Answers (2)

Sanjeev
Sanjeev

Reputation: 1097

Example: suppose field name in your jsp form is {input type="text" name="customerName"}

in java file. use request.getParameter("customerName"); for getting change value from front end.

Upvotes: 1

Foredoomed
Foredoomed

Reputation: 2239

If those editable fields are in a form and the form's method property is post, those values will be automatically passed to the backend. You can get them through request.getParameter() method.

Upvotes: 0

Related Questions