This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes JSTL tags and test conditions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL tags and test conditions" Watch "JSTL tags and test conditions" New topic
Author

JSTL tags and test conditions

Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
Okay, I thought I had this working, but it doesn't seem to be anymore. I have a servlet that sets some session attributes.

Then I have a JSP that the servlet redirects to.


Currently it only prints out C no matter the values of the variables. I'm getting the correct values out of the c.out statements, so I can only assume that something is wrong with my test statements. I've tried as listed, with ==true and with ==Boolean.TRUE.

What am I missing?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

So you are saying when agency is true, that its still displaying (not "printing") C?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ue EL expressions instead of those parenthesis.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Oh, snap!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Good catch David! Just those few tiny pixels of difference! (I have to put my nose practically up to the screen to see the difference.)
Bai Shen
Ranch Hand

Joined: Sep 24, 2008
Posts: 323
That was it. Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL tags and test conditions
 
Similar Threads
Implementation of google charts in JSP
Boolean operations inside conditional tags
Total newby JSP if block question is this legal
Cannot set parameter in HTML:Link
Nesting JSTL Tags