In a program that I have to do I came up with this difficulty
Familia.setSalariodoPai(request.getParameter("salariodoPai"));
But this request is returning a String and I would need Integer
.obs this snippet is in a servlet doGet
In a program that I have to do I came up with this difficulty
Familia.setSalariodoPai(request.getParameter("salariodoPai"));
But this request is returning a String and I would need Integer
.obs this snippet is in a servlet doGet
You need to convert to Integer.
Familia.setSalariodoPai(Integer.parseInt(request.getParameter("salariodoPai")));
There are several topics explaining this, search before posting:)