For example: String name = Request.getparameter ("name");
If the client incoming page has no accessible control with name, the obtained name value is null; If the client incoming page has a accessible control with name, but no value entered, the name value is "";
So you have to judge. <input type= "text" name= "name" value= "<%=request.getparameter (" name ") ==null?": Request.getparameter ("name") %> "/> (index.jsp)
The server-side code is as follows:
String name=request.getparameter ("Name11");
String password=request.getparameter ("password");
if (name==null) {out.println ("empty null"); }
if ("". Equals (name)) {OUT.PRINTLN ("null for double quotes"); }
The server request (index.jsp) This page, he has not submitted the form, that is, the service does not confiscate the value passed in the name parameter, so at this time should conform to if (name==null) {out.println ("null"); } This condition, so value= "<%=request.getparameter (" name ") ==null?": Request.getparameter ("name")%> "the judgment is correct.
JSP related null and double quotes how to judge?