File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes logic:notpresent vs logic;empty Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:notpresent vs logic;empty" Watch "logic:notpresent vs logic;empty" New topic
Author

logic:notpresent vs logic;empty

Ganesh Kumar
Ranch Hand

Joined: Jul 02, 2007
Posts: 113
Hi,


Can anyone tell me the Difference between logic:notpresent and logic:empty



Thankyou
GaneshKumar
Joe Sal
Greenhorn

Joined: Feb 06, 2006
Posts: 13
usually notpresent is used for availability of roles so you can tailor your jsp pages based on roles. But it basically checks for the existance of objects.

empty is for checking if strings (length of 0) or collections (null) are empty.
[ August 16, 2007: Message edited by: Joe Sal ]
Ranjit Gopinathan
Ranch Hand

Joined: Jul 03, 2007
Posts: 46
The wrapped content of notPresent tag is processed based on whether the object specified does not exist.
notPresent tag can be used with these attributes
cookie, header, parameter , name ,property, role and user
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: logic:notpresent vs logic;empty