Reputation: 23
Updating to other post where question is answered already.
Upvotes: 1
Views: 41
Reputation: 21975
You should use the accessors from your Loan
object since you haven't defined any constructor accepting parameters (or defined but not made them accessible - e.g private
).
Loan loanAmount = new Loan(Integer.parseInt(request.getParameter("loanAmount")));
Can be replaced by for example
Loan loan = new Loan();
load.setAmount(Integer.parseInt(request.getParameter("loanAmount")));
Upvotes: 1