When I call request.getParameter to get the value of a field from the calling page, if that field was blank then is the string returned "" (empty)? I am using a conditional like if(name != "" && email != "") and even if I leave the fields blank it still enters the if and never sees the else. Why?
Joined: Nov 06, 2000
I always check for null and the length of the returned parameter. What is returned (null or "") depends on the browser. EX: if( (email != null) && (email.length() != 0) )
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Joined: Jun 21, 2001
I am using the .equals method and it is working now. Thanks