严重: Servlet.service() for servlet ModuleServlet threw exceptionjava.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:468) at java.lang.Integer.parseInt(Integer.java:497) at com.seecen.system.control.ModuleServlet.save(ModuleServlet.java:66)这是save里面的代码 protected void save(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ModuleDao dao = new ModuleDaoImpl(); Module module = new Module(); String name = request.getParameter("name"); String url = request.getParameter("url"); int is_child = Integer.parseInt(request.getParameter("is_child")); int pid = Integer.parseInt(request.getParameter("pid"));; module.setPid(pid); module.setName(name); module.setUrl(url); module.setIs_child(is_child); if(!StringUtil.empty(pid)){ module.setPid(pid); } boolean result = dao.addModule(module);
添加回答
举报
0/150
提交
取消