HttpSession session = request.getSession(false);
If create is false and the request has no valid HttpSession, this method returns null.
改成HttpSession session = request.getSession(true);
If create is false and the request has no valid HttpSession, this method returns null.
改成HttpSession session = request.getSession(true);
try{
if(seeion!=null) session.setAttribute("userid",UserID);
...
}