File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 61458
    
  67

! 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: 61458
    
  67

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: 61458
    
  67

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