OGNL treats a character in single-quotes as an actual character, not a String.
d. --- quinquin2209 <[EMAIL PROTECTED]> wrote: > > I have defined a hyperlink as follow: > > <s:url id="inboxReceived" value="/main/list.action"> > <s:param name="state">I</s:param> > </s:url> > > and when the page is called ,it will use the param "state" for processing > as > follow: > > <s:if test="%{state=='I'}"> > Inbox - Received > </s:if> > <s:elseif test="%{state=='E'}"> > Inbox - Exported > </s:elseif> > <s:else> > Not Found > </s:else> > > The NOT Found is always shown. However, if I change the param "state" to > "IR" and change the testing condition to > > <s:if test="%{state=='IR'}"> > Inbox - Received > </s:if> > <s:elseif test="%{state=='IE'}"> > Inbox - Exported > </s:elseif> > <s:else> > Not Found > </s:else> > > The correct result is returned. > > Is there anything I need to do when the testing condition contains only 1 > character? > -- > View this message in context: > http://www.nabble.com/Problem-with-%3Cs%3Aif%3E-tp14313232p14313232.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]