判断字符串相等,不等应该用 equals 方法,不是 == String getParameter(String name) Returns the value of a request parameter as a String, or null if the parameter does not exist. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data. 如果参数不存在,则为null
楼主的情况,获取到的参数应该为空字符串 "" 楼主试着通过if ( !("".equals(oldpd)) && !("".equals(pd1)) && !("".equals(pd2))) {
// your code
}
试试看
楼主的情况,获取到的参数应该为空字符串 "" 楼主试着通过if ( !("".equals(oldpd)) && !("".equals(pd1)) && !("".equals(pd2))) {
// your code
}
试试看
if ( pd1 != null && !pd1.trim().equals(""))
就可以了啊
StringUtils.isNotBlank(变量) 返回boolean