• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Struts1: evaluating two conditions  RSS feed

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I know java quite well, and I'm from the scriptlet school of JSPs. So I'm a total Struts taglib newb, and I'm puzzled about how to do the following code in Struts taglibs:



Where I have the //1 and //2 are where I'm stuck. How do I say this using taglibs? (I've got all the rest of the code working with taglibs):


Can I check for both !=null and .size>0 in one taglib, and then have a second taglib for the case where it's either .size==0 or size==null ?

Thanks.
[ April 02, 2008: Message edited by: Mike Fourier ]
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can do this with jstl tags, but if you want to use the Struts tags then it seems that you would want to use logic:empty and logic:notEmpty.

- Brent
 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library
https://coderanch.com/t/710903/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!