- <from action="research.jsp" method="post">
- 请输入你的id号:<input type="text" name="id"><br>
- <input type="submit" value="提交">
- </from>
- <body>
-
- 以下是research.jsp页面的内容
你要查询的数据是:
<%
Model model=new Model();
int id=Integer.parseInt(request.getParameter("id"));
User user=model.load(id);
out.print(user.getId()+" "+user.getName()+" "+user.getPassword());
%>
报错信息:
严重: Servlet.service() for servlet [jsp] in context with path [/TestProject] threw exception [java.lang.NumberFormatException: null] with root cause
java.lang.NumberFormatException: null