It's not a secret anymore!
The moose likes Struts and the fly likes need help in <s:if> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "need help in <s:if> " Watch "need help in <s:if> " New topic

need help in <s:if>

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 303
I am using strut2.And want if session value='CyberQ' then Home should print otherwise blank.
I did like this.But its now working.
Please help me where i am wrong

David Newton

Joined: Sep 29, 2008
Posts: 12617

Did you mean to say it's *not* working?

Are you sure there's a bean in the session named "loginDetails"? Does it have a "role" getter? Is its value "CyberQ"? You can also try using the equals() method in the "test" attribute's OGNL expression.
I agree. Here's the link:
subject: need help in <s:if>
It's not a secret anymore!