I try to pass studentId of the int data type to the servlet, but it does not accept it and forces me to change the data type to String
int studentId; String studentName; studentId = request.getParameter("StudentId");
I cannot change it to String, because in the database studentId is an integer (primary key) and my java class also accepts int as a parameter.
How can i solve this?
source share