tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Bowen <kbo...@als.com>
Subject Re: rewrite analogue exists?
Date Fri, 24 Oct 2008 13:25:20 GMT
Is there an el file I'm missing?  I added the definition as you  
indicated, and here's what I have in the JSP (/layouts/classic2.jsp):

<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<tiles:importAttribute name="css" />
<c:url var="cssUrl" value="${css}" />

<html>
<head>
     <title><tiles:getAsString name="title"/></title>
     <LINK rel="stylesheet" type="text/css" href="<c:out value='$ 
{cssUrl}' />" />
....more

I get the Exception:
org.apache.jasper.JasperException: /layouts/classic2.jsp(4,0)  
According to TLD or attribute directive in tag file, attribute value  
does not accept any expressions
.....

I'm working in (My)Eclipse and had it install the JSTL 1.0 files.  The  
TLDs include

c-rt.tld              fmt-rt.tld            permittedTaglibs.tld  sql- 
rt.tld            x-rt.tld
c.tld                 fmt.tld               scriptfree.tld         
sql.tld               x.tld

but no *-el files.  The jars include jstl.jar and standard.jar.

What am I missing?
Thanks
Ken



On Oct 24, 2008, at 3:15 AM, Antonio wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message