因为java是强类型语言,所以判断空的时候分null 和字符串空
if(userID == null || "".equals(userID)){ response.sendRedirect("login.jsp?errorType="+Utility.encrypt("1")+"&userID="+userID); return; }