tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <bay...@essentially.net>
Subject RE: Root Element Error
Date Wed, 07 Aug 2002 14:49:56 GMT
On Wed, 7 Aug 2002, Ben Ramsey wrote:

> In ASP I can check the length of a form parameter or a querystring
> parameter to check whether or not it contains any data.  If the
> parameter doesn't exist, or if it does exist but doesn't contain any
> data, then it just returns a length of zero, thus I can tell whether
> anything has been passed through.
> 
> It looks to me that, in JSP, if the parameter does exist but doesn't
> contain any data, then it's simply empty but not null.  However, if it
> doesn't exist, then it's null.
> 
> How can I check for this in JSP?  Using JSTL?

The easiest way to lump 'empty' and 'null' together is with the JSTL EL's
'empty' keyword, as in

  ${empty param.foo}

-- 
Shawn Bayern
"JSTL in Action"   http://www.jstlbook.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message