struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric D Nielsen <niels...@MIT.EDU>
Subject S2: s:include tag and s:param
Date Sun, 27 Jul 2008 19:49:32 GMT
I've been having trouble getting s:include and s:param to work.

I have a snippet I want to include in multiple pages.  This snippet will want to
make use of Struts 2 tags and OGNL, though at present I just need a simple
c:out.

The snippet looks like:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<div class="primaryBox">
  <h1>Competition Information</h1>
  <c:out value="${comp.name}" />
</div>
------------- END --------------

I'm currently using it with:
    <s:include value="/WEB-INF/components/competitions/identity-readonly.jsp">
	  <s:param name="comp" value="competition" />
    </s:include>
------------ END -------------

The c:out isn't printing anything.

I've tried using ${} notation in the param value; that doesn't lead any
different behavoir for me.

If I reference competition.name in the snippet and skip the s:param, everything
works on this page (because the action exposes the competition property. 
However other pages that include it will not expose it directly (but I can
navigate to it from properties that are exposed).

What am I missing?

Eric


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


Mime
View raw message