aspose file tools*
The moose likes JSP and the fly likes comparing Integer values in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "comparing Integer values in JSP" Watch "comparing Integer values in JSP" New topic
Author

comparing Integer values in JSP

bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
This should probably be a simple one for most of you, but apparently not for me.

I am trying to do this:

<c:if test="${NoticeBean.mostRecent} == 1">

where NoticeBean.mostRecent returns a 0 or 1 of type Integer (not int).

Any idears?


"...and the Truth will set you free."
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

Try:



the braces must enclose the entire EL expression.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
bryan nelson
Ranch Hand

Joined: Jun 16, 2003
Posts: 95
oh man.
is my face red.

Thanks!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61434
    
  67

It's a common error. Don't feel bad.

Recomendation: rename NoticeBean to noticeBean. Scoped variables should follow normal Java variable naming conventions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: comparing Integer values in JSP