Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

logic: equal ignore case

Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

i need a logic tag to do a case insensitive check like ( String equalsIgnoreCase method).

Can any one help me out .

Thanks in advance,
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"equalsIgnoreCase", AND-ing, OR-ing are but one of the many shortcomings, which has led to an increased adoption of JSTL tags as the preferred set tags while developing JSPs.

If migrating to JSTL is not a feasible option for you, then I fear you can either (a) write a Java scriptlet to implement your logic, or (b), extend the "logic" taglib library and put in your own implementation of "equalsIgnoreCase" within the TLD.
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I generally figure that if I have to think for more than a few seconds about how to code something using tags in the jsp then it is better to just move the logic into the action form class. I am not sure what you are testing here...if you are comparing two form properties you could add a method that returned a boolean and use logic:equal or maybe you could create a method that returned the needed property as all upper (or lower) case.

- Brent
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic