.jsp
<% MainProgram.MainAverageProgram myProgram
= new MainProgram.MainAverageProgram(); %>
<% out.println("" + myProgram.getForm()); %>
// returns simple form with parameter user
<% myProgram.comAvgerage(request.getParameter("user"));%>
I wish to get the user field and convert it to an int. Then I want to use this int in a java class, do i convert it in the jsp file or in a java method ?
java method
public String comAvgerage( String number )
{
int user = Integer.parseInt(number);
return user;
}
i dont understand why this fails, it will always be null when the program runs right ?