File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of The Software Craftsman this week in the Agile forum!
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: 301
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.
Have you tried LearnNowOnline?
subject: need help in <s:if>