My controller.java encounter an input string: "undefined".
Please help.
public ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
int rowsPerPage = 20;
String rowsPerPageStr = request.getParameter("rowsPerPage");
logger.info("rowsPerPageStr " + rowsPerPageStr);
if (rowsPerPageStr != null) {
rowsPerPage = Integer.parseInt(rowsPerPageStr);
}
My jsp page use javascript as follows:
window.location = "hwdisplay?rowsPerPage=" + rowsPerPage;
Eclipse Console output is:
rowsPerPageStr undefined
Servlet.service() for servlet hwmgr threw exception java.lang.NumberFormatException: For input string: "undefined"