

这个是两个页面的编码

三个“text”为空 当我点击“确认修改提交到判断页面的时候,明明是空的但是在判断页面

运行结果图

貌似是传递了3个空格过去而且

------解决思路----------------------
判断字符串相等,不等应该用 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
}
试试看