[JSP] getParameter null pointer exception
Computer/IT/JSP 2007/04/18 10:09 |<%
String cmd = request.getParameter("cmd");
if (cmd != null && cmd.equals("loginUserForm"))
{
%>
<jsp:include page="./user/loginUserForm.jsp" />
<%
}
%>
<%
}
%>
<%
String cmd = request.getParameter("cmd");
if (cmd == null) cmd = "main";
if (cmd.equals("loginUserForm"))
{
%>
<jsp:include page="./user/loginUserForm.jsp" />
<%
}
%>
<%
}
%>
기본 nullpointer exception 처리.
조건검사를 한번 하던가... 디폴트 값 입력으로 일단 해결~
'Computer/IT > JSP' 카테고리의 다른 글
| eclipse에서 실행중인 프로그램 classpath 구하기 (0) | 2010/02/23 |
|---|---|
| [JSP] WARNING: Parameters: Invalid chunk ignored. remove (0) | 2008/06/23 |
| [JSP] getParameter null pointer exception (0) | 2007/04/18 |
| [Servlet] Redirection! (0) | 2007/04/18 |
| [JSP] Java Beans(자바빈) (0) | 2006/10/01 |
| [JSP] URLEncoder (0) | 2006/09/30 |

댓글을 달아 주세요