Yes it does - thanks for the tip!  So I'm guessing (since this works) that I
can replace all my <html:rewrite page=""/> with <c:url value=""/>?  I dig
that - much shorter.

Matt

-----Original Message-----
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 17, 2003 9:59 AM
To: Struts Users Mailing List
Subject: Re: html-el: page attribute doesn't accept run-time expressions


Does this work:

<c:forEach var="js" items="${scriptList}">
  <script type="text/javascript"
          src="<c:url value="${js}"/>">
  </script>
</c:forEach>

None of the EL tags should have <rtexprvalue> set to true, right? That's for
JSP
expressions, not EL expressions.

Quoting "Raible, Matt" <[EMAIL PROTECTED]>:

> In struts-html.tld, the page attribute allows run-time expressions:
> 
> <attribute>
> <name>page</name>
> <required>false</required>
> <rtexprvalue>false</rtexprvalue>
> </attribute>
> 
> However, in struts-html-el, the page attribute does not allow run-time
> expressions:
> 
> <attribute>
> <name>page</name>
> <required>false</required>
> <rtexprvalue>false</rtexprvalue> <--
> </attribute>
> 
> Is this a bug?  
> 
> The reason I ask is because the following code works fine in Tomcat
4.1.24:
> 
>     <%-- Get Javascript List --%>
>     <tiles:useAttribute id="scriptList" name="scripts" 
>         classname="java.util.List" ignore="true"/>
>     
>     <c:forEach var="js" items="${scriptList}">
>         <script type="text/javascript"
>             src="<html-el:rewrite page="${js}"/>"></script>
>     </c:forEach>
> 
> But in Tomcat 5.0.4, maybe things are stricter or something, but I get the
> following error:
> 
> org.apache.jasper.JasperException: /layouts/baseLayout.jsp(22,17)
According
> to TLD or attribute dire
> ctive in tag file, attribute page does not accept any expressions
> 
> If I change it to the following, everything works fine:
> 
>     <c:forEach var="js" items="${scriptList}">
>         <script type="text/javascript"
>             src="<%=request.getContextPath()%>${js}"/>"></script>
>     </c:forEach>
> 
> Thanks,
> 
> Matt

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to