Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JSP
Search Coderanch
Advance search
Google search
Register / Login
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JSP
Conditional logic on List
Ryan Day
Ranch Hand
Posts: 87
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I'm passing a java.util.List object to my
JSP
, and I only want to display a section of the JSP code if the List is not empty.
I tried the following:
<c:if test="${requestScope.congresses gt 0}">
But I got the following error:
Error 500: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
Q: What's the best way to perform this logic based on the number of items in the list?
SCJP, SCWCD
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
That would very much depend uon what congresses is set to. I strongly advise you add more detail to your posts.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Screaming fools! It's nothing more than a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
logic:match , logic:notEqual not working
Use of out.write() method
JSP Struts/JSTL Form problem
Related to Javascripet SELECT object
Best Practices for Presentation Layer
More...