Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Confusion about why not empty function is not working  RSS feed

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The JSTL 'not empty" function does not seem to be working. I have this block of JSTL, in which the "result.fax" is "empty" in the sense that its string length is zero. I'm using Sun's taglib, "http://java.sun.com/jsp/jstl/functions" for the string functions. However,



printed

Fax: len: 0

If the string length was zero, should the not empty clause evaluate to false and nothing should be printed? Then I tried ...



which printed

Fax: len: 0

How do I figure out why the tests are evaluating to true when they should be evaluating to false? - Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per forum instructions we need to know what versions of Servlets, JSP and JSTL you are using.

999,999,999 times out of 1,000,000,000, weird results are cause by a misconfigured web app.
 
Paul Clapham
Sheriff
Posts: 22185
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the debugging point of view, I suggest you be a bit more direct in your testing:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!