Purav wrote:
>
> The Request.getparameter() method return null string when it does not find
> the parameter. it does not return null as a keyword
>
> so if i write
> String Name=Request.getParameter("Name");
> if(Name==null)
>   then something....
>
> It doesnt work

- If the parameter named Name does NOT exist, getParameter will return null
(keyword)
- If the checkbox, radio button, select list, etc., parameter named Name does
exist, but was not selected, it will return null (keyword)
- If the checkbox, radio button, select list, etc., parameter named Name does
exist, and it was selected, it will return a String value. If it is a
multi-selection (checkbox, select list), it will return the first selected value
(which is why you should usually use getParameterValues(), unless you know for
certain only one value will be returned). If the value of the checkbox is "null"
(<input type=radio name=Name value=null>), then that String will be returned
- If the text, password, etc., parameter named Name does exist, and its value is
non-null, it will return a String. If its value is "null", that is non-null and
it will return the String "null". If it's value is "", then it will return a
String ""
- If the value is null (keyword), and you try something like
System.out.println(Name), then this will print "null" where the null value of
Name has been converted to the String "null".

K Mukhar

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to