tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio <antonio.petre...@gmail.com>
Subject Re: rewrite analogue exists?
Date Fri, 24 Oct 2008 07:15:58 GMT
2008/10/23 Ken Bowen <kbowen@als.com>:
>      <LINK rel="stylesheet" type="text/css" href="<html:rewrite
> forward='common_styles'/>" />
>...
> Is there any way I can achieve the same effect using standalone Tiles?

Probably using a string attribute. In your master definition put:

<definition name="master.definition" template="/layout/defaultTemplate.jsp" >
  <put-attribute name="css" value="/css/common_styles.css" />
</definition>

Then in your JSP:
<tiles:importAttribute name="css" />
<c:url var="cssUrl" value="${css}" />
<LINK rel="stylesheet" type="text/css" href="<c:out value='${cssUrl}' />" />

HTH
Antonio

>
> Thanks in advance,
> Ken Bowen
>
>

Mime
View raw message