hello agarwal
u can check null variable like:
if( a=3D=3Dnull)
{
=2E..
=2E..
}
where a is any variable
regards
mushtaque husain
"Amit Agarwal" <Amit.Agarwal@p...> wrote:
First of all check that whether or not you have initialised the variable
to
null.
If you are initialising the variable by means of request object then chec
k
whether the variable is null(If the request parameter is not defined ) or
blank (If the parameter value is blank)
Hence depending on your requriement you must check for variable being
null,or blank or both
Cheers
Amit
----- Original Message -----
From: <ndramkumar@s...>
To: Pro_JavaServer_Pages <pro_jsp@p...>
Sent: Wednesday, January 17, 2001 5:24 PM
Subject: [pro_jsp] How to handle a null variable in JSP
> How to handle a null variable in JSP.
>
> for ex:-
>
> String flag;
>
> i want to perform an action if it is null and
> another action if it is not null.
>
> can i check like this:- if (flag=3D=3Dnull)
> if(flag!=3Dnull)
>
> sometimes it works fine and othertimes it doesn\'t
> work.
>
> what is the reason and the solution.