标签:
String usernameInForm = hreq.getParameter("username");
String passwordInForm = hreq.getParameter("password");
System.out.println(hreq.getParameter("username") == null);
System.out.println(hreq.getParameter("password") == null);
System.out.println(hreq.getParameter("passw") == null);
第二种不合适,因为equals方法是String的,一旦usernameForm报异常还是会报错
标签:
原文地址:http://www.cnblogs.com/balfish/p/4679794.html