You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mark Benussi <ma...@hotmail.com> on 2004/09/23 23:36:53 UTC

Tiles putList and jsp:include of list values

My jsp works great in my development IDE.

page:

<tiles:putList name="right_features">
	<tiles:add type="page" value="/templates/features/logon.jsp" />
	<tiles:add type="page" value="/templates/features/basket.jsp" />
	<tiles:add type="page" value="/templates/features/promotions.jsp" />
	<tiles:add type="page" value="/templates/features/verisign.jsp" />
</tiles:putList>

template:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tiles:importAttribute name="right_features" />
<logic:iterate id="right_feature" name="right_features">
	<tr>
		<td><jsp:include page="<%= right_feature %>" flush="true" /></td>
	</tr>
</logic:iterate>
</table>

It iterates over the add options in the list and writes them to the page. 
However in Tomcat 4 and 5 it fails with

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 37 in the jsp file: /templates/template.jsp
Generated servlet error:
C:\Program Files\Apache Software Foundation\Tomcat 
5.0\work\Catalina\localhost\_\org\apache\jsp\templates\template_jsp.java:138: 
include(javax.servlet.ServletRequest,javax.servlet.ServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean) 
in org.apache.jasper.runtime.JspRuntimeLibrary cannot be applied to 
(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Object,javax.servlet.jsp.JspWriter,boolean)
          org.apache.jasper.runtime.JspRuntimeLibrary.include(request, 
response,  left_feature , out, true);
                                                     ^
1 error

Does anyone have any idea. I have a demo in 10 hours and am at my wits end.



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