This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 61054
    
  66

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: 61054
    
  66

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSTL tags and test conditions