작성
·
339
0
java.lang.NumberFormatException: null
java.lang.Integer.parseInt(Integer.java:542)
java.lang.Integer.parseInt(Integer.java:615)
kr.bit.controller.MemberInsertController.service(MemberInsertController.java:19)
javax.servlet.http.HttpServlet.service(HttpServlet.java:779)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
@WebServlet("/memberInsert.do")
public class MemberInsertController extends HttpServlet {
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//1. 파라미터 수집(VO)
String id=request.getParameter("id");
String pass=request.getParameter("pass");
String name=request.getParameter("name");
int age=Integer.parseInt(request.getParameter("age"));
String email=request.getParameter("email");
String phone=request.getParameter("phone");
//MemberVO vo=new MemberVO(id, pass, name, age, email, phone);
MemberVO vo=new MemberVO();
vo.setId(id);
vo.setPass(pass);
vo.setName(name);
vo.setAge(age);
vo.setEmail(email);
vo.setPhone(phone);
System.out.println(vo.toString());
String형을 int형으로 변환해줬는데도 age쪽에서 오류가 발생하고
아랫부분들은 service메서드쪽에 왜 발생한 것인지 모르겠어요.. 답변 부탁드립니다