I think it's because you're comparing a single character string, which OGNL treats as a bit of a special case for some reason.
I dont have my code with me now but I'm pretty sure I had the same problem. Google 'comparing single character string in ognl' for some pointers (sorry, I cant verify myself right now) -----Original Message----- From: Griffith, Michael * [mailto:michael.griff...@fda.hhs.gov] Sent: Fri 06/02/2009 19:27 To: Struts Users Mailing List Subject: What's the correct expression syntax? Hi, I don't think I fully understand OGNL and I need some help with an expression... I have a param that I am passing to an action. the parameter is called selectedType, and it has a getter and setter on the action. It is getting set correctly. When I try to evaluate the expression using the <s:if> tag, it never evaluates correctly. The action parameter is as follows; ./component/new.action?selectedType=C I've tried the following expressions <s:if test="%{selectedType == 'C'}"> ... Do work </s:if> <s:if test="%{#selectedType == 'C'}"> ... Do work </s:if> <s:if test="${selectedType == 'C'}"> ... Do work </s:if> None of which seem to work. Can someone clear this up? Thanks in advance, MG --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org