I am using this and works for me:

<s:if test="(myMsg != 'Y')">
...
</s:if>

Also remove the hidden field from your jsp and then  check if you getter from 
this action is called.

HTH
Radu

-----Original Message-----
From: Sonu S [mailto:sonu...@gmail.com]
Sent: August 28, 2009 10:37 AM
To: user@struts.apache.org
Subject: Struts 2 <s:if tag

Hi,

i am using struts 2. i want to check some condition in my jsp and based on
result i want to perform some task.

i have written

<s:if test="%{status!='N'}">
    //DO something
</s:if>
<s:else>
    // Do Something else
</s:else>

for this i have created one hidden field also in JSP named status and have
getter and setter method in Action class.

but things are not working as expected. Even if status is Y it always
execute ELSE part. please let me what i am doing wrong.

thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to