I was trying to avoid <% if(....) ...%> in my jsps by using request Object and since I am not using JSTL in favor of struts 2 tags, <c:if ...> tag is not possible.
I have managed to get around the problem with a less favorable approach. My <s:include> now looks like: <s:include value="./includes/tabs.jsp"> <s:param name="tab1Class" value="%{'on'}" /> <s:param name="tab2Class" value="%{'off'}" /> </s:include> and in my tabs.jsp I have someting: <td class="${param.tab1Class}" >...</td> <td class="${param.tab2Class}" >...</td> What I do not like about this approach is If I add a new tab, I not only have to update tabs.jsp but every single jsp that includes it. I believe <s:include> tag should be able to handle a simple case like the one I was trying to do. Anyways, thank you for your replies and time. --- On Fri, 2/6/09, Wes Wannemacher <w...@wantii.com> wrote: > From: Wes Wannemacher <w...@wantii.com> > Subject: Re: How to use "s:include" param in s:if > To: "Struts Users Mailing List" <user@struts.apache.org> > Received: Friday, February 6, 2009, 11:48 PM > On Friday 06 February 2009 18:27:18 Struts Two wrote: > > Wes , > > > > Thank you for your reply, Unfortunately that does not > work. The if > > statement return false [I print ${param.tab1} on the > page and it has the > > value 'tab1' yet if statement is false]. I am > using struts 2.0.14. > > > > Hmm... Strange. I don't know if it matters, but > ${param.tab1} probably works > because it's a legit EL expression. Your include points > directly to a JSP, > rather than an action. Try doing the whole thing in EL, you > might be able to > accomplish what you're looking for with less hassle. > > -Wes > > > -- > > Wes Wannemacher > Author - Struts 2 In Practice > Includes coverage of Struts 2.1, Spring, JPA, JQuery, > Sitemesh and more > http://www.manning.com/wannemacher > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org __________________________________________________________________ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org