try any of these, dont get confused with jstl, also be careful using % vs #
<s:if test="%{statement}">Hello World</s:if> <s:if test="statement">Hello World</s:if> let us know if further problem exists Thanks --- joey <[EMAIL PROTECTED]> wrote: > I thought it may be like this: > <s:if test="statement"}>Hello World</s:if> or > <s:if test="%{statement}"}>Hello World</s:if> > > On 3/27/07, Darren Salomons > <[EMAIL PROTECTED]> wrote: > > > > > > I don't know if this is a bug or if I'm doing > something wrong but the if > > tag > > in Struts 2 always returns false for the first run > and then if I hit > > refresh > > it gets the correct value. > > > > > > In my action class I have a method like this: > > > > getStatement() { > > return true; > > } > > > > > > And then in my jsp I do something like: > > > > <s:if test=${statement}>Hello World</s:if> > > > > Hello World is only printed after I hit reload. I > cleared my cache, > > opened > > my browser and tried again and the same thing > happens. > > > > Any ideas? Darren > > -- > > View this message in context: > > > http://www.nabble.com/if-tag-doesn%27t-seem-to-work%28Struts-2%29-tf3471295.html#a9687189 > > Sent from the Struts - User mailing list archive > at Nabble.com. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > ____________________________________________________________________________________ Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]