严重: Servlet.service() for servlet ModuleServlet threw exception
java.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);
yanrun
慕圣2260377
相关分类