tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Ramsey" <...@eureka-interactive.com>
Subject RE: Root Element Error
Date Wed, 07 Aug 2002 15:09:46 GMT
> The easiest way to lump 'empty' and 'null' together is with the
> JSTL EL's 'empty' keyword, as in
> ${empty param.foo}

So, I would use that like this?:

<c:if test="${empty param.foo}">
  Body content.
</c:if>


Ben Ramsey
Technical Director
EUREKA! Interactive, Inc.
770-642-0390
www.eureka-interactive.com



-----Original Message-----
From: Shawn Bayern [mailto:bayern@essentially.net]
Sent: Wednesday, August 07, 2002 10:50 AM
To: Tag Libraries Users List
Subject: RE: Root Element Error


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