This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL not operator question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL not operator question" Watch "JSTL not operator question" New topic
Author

JSTL not operator question

Tim Manchester
Ranch Hand

Joined: Nov 03, 2004
Posts: 62
Howdy,

I'm looking at a jsp that isn't working as I thought it should and I see several cases where a comparison is done that the '!' operator is used as opposed to 'not'. I haven't read that you can use '!' alone so I was wondering if that was a problem with the following lines...


I do know you can use '!=' which I imagine could lead to the confusion with '!'. Am I correct about this?

Regards,

Tim
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

! as a unary operator and the not keyword are synonymous.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim Manchester
Ranch Hand

Joined: Nov 03, 2004
Posts: 62
OK, thanks!

Regards,

Tim
Tim Manchester
Ranch Hand

Joined: Nov 03, 2004
Posts: 62
Follow up question:

Is it a bug to say


should you say


?

Regards,

Tim
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

The whitespace is moot. Are you seeing a concrete problem?
Tim Manchester
Ranch Hand

Joined: Nov 03, 2004
Posts: 62
Yes but it's difficult to get the data so I was hoping it would be a jsp issue. It looks more like a data issue now. Thanks.

Regards,

Tim
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

It usually is. Some perverse law says that the problem will always be in the area hardest to debug!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSTL not operator question
 
Similar Threads
Problem with nested c:forEach
[struts 1.x] using indexId of logic:iterate
JSTL if statement does not work
java bean
jsp:useBean tag Rules