aspose file tools*
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "need help in <s:if> " Watch "need help in <s:if> " New topic
Author

need help in <s:if>

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
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
Author
Rancher

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: http://aspose.com/file-tools
 
subject: need help in <s:if>
 
Similar Threads
S:elseif not working correctly
set the strut tag
Struts2: Compare request parameter not working
Struts tag iterator new line every 4th item
Struts2 - if tag - OR condition