I just noticed a difference between the struts-tiles.tld files
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>Tiles Tag Library</shortname>
<uri>http://jakarta.apache.org/struts/tags-tiles-1.1</uri>
<tag>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib> <tlibversion>1.2</tlibversion> <jspversion>1.1</jspversion> <shortname>tiles</shortname> <uri>http://struts.apache.org/tags-tiles</uri> <tag>
Does anyone know where to find info as to what I need to do to updrage to the latest version tlibversion?
Jim
From: "Jim Douglas" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" <user@struts.apache.org> To: [EMAIL PROTECTED], user@struts.apache.org Subject: Re: Check Tag problem? Date: Mon, 03 Jan 2005 22:32:57 +0000
useAttribute is in struts-tiles.tld...still no luck. This is frustrating because it is from the example that comes with Tiles. Does anybody know of any IDE's that allow you to step thru JSP code?
...this is vboxLayout.jsp,
<%@ page import="java.util.Iterator"%> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%-- Layout component Render a list of tiles in a vertical column @param : list List of names to insert
--%>
<tiles:useAttribute id="list" name="list" classname="java.util.List" />
<%-- Iterate over names. We don't use <iterate> tag because it doesn't allow insert (in JSP1.1) --%> <% Iterator i=list.iterator(); while( i.hasNext() ) { String name= (String)i.next(); %> <tiles:insert name="<%=name%>" flush="true" /> <br>
<% } // end loop %>
...this is columnsLayout.jsp,
<%@ page import="org.apache.struts.tiles.ComponentContext"%> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%-- Layout component Render a list on severals columns parameters : numCols, list0, list1, list2, list3, ... --%>
<tiles:useAttribute id="numColsStr" name="numCols" classname="java.lang.String" />
<table> <tr> <% int numCols = Integer.parseInt(numColsStr); ComponentContext context = ComponentContext.getContext( request ); for( int i=0; i<numCols; i++ ) { java.util.List list=(java.util.List)context.getAttribute( "list" + i ); pageContext.setAttribute("list", list ); if(list==null) System.out.println( "list is null for " + i ); %> <td valign="top"> <tiles:insert page="/common/layouts/vboxLayout.jsp" flush="true" > <tiles:put name="componentsList" beanName="list" beanScope="page" /> </tiles:insert> </td> <% } // end loop %> </tr> </table>
This is the error...
DEBUG - insert page='/common/layouts/columnsLayout.jsp'.
DEBUG - servletPath=/common/layouts/columnsLayout.jsp, pathInfo=null, queryString=null, name=null
DEBUG - Path Based Include
DEBUG - insert page='/common/layouts/vboxLayout.jsp'.
DEBUG - servletPath=/common/layouts/vboxLayout.jsp, pathInfo=null, queryString=null, name=null
DEBUG - Path Based Include
ERROR - Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Error - tag useAttribute : attribute 'list' not found in context. Check tag syntax
at org.apache.struts.taglib.tiles.UseAttributeTag.doStartTag(UseAttributeTag.java:184)
at org.apache.jsp.common.layouts.vboxLayout_jsp._jspService(org.apache.jsp.common.layouts.vboxLayout_jsp:73)
Jim
From: Pavel Kolesnikov <[EMAIL PROTECTED]> Reply-To: Pavel Kolesnikov <[EMAIL PROTECTED]> To: Struts Users Mailing List <user@struts.apache.org> Subject: Re: Check Tag problem? Date: Mon, 3 Jan 2005 18:52:21 +0100
It simply says it can't find tile definition referenced by "name" attribute of
your "useAttribute" tag. Try to check out if your tiles definitions.
Pavel
On Mon, 03 Jan 2005 03:08:57 +0000, Jim Douglas <[EMAIL PROTECTED]> wrote:
> I used the example that came with tiles to create a site and I keep getting
> this error below,
>
> ERROR - Servlet.service() for servlet jsp threw exception
> javax.servlet.jsp.JspException: Error - tag useAttribute : attribute 'list'
> not found in context. Check tag syntax
> at
> org.apache.struts.taglib.tiles.UseAttributeTag.doStartTag(UseAttributeTag.java:184)
> at
> org.apache.jsp.common.layouts.vboxLayout_jsp._jspService(org.apache.jsp.common.layouts.vboxLayout_jsp:73)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
>
> Where do I look to check the Tag Syntax?. (I never changed it!)
>
> The only thing I have done is to move all the layout files into a common
> directory. (columnslayout.jsp, body.jsp, header.jsp and footer.jsp. I made
> sure the files are in the right location but I keep getting this error)
>
> Jim
>
> ---------------------------------------------------------------------
> 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]
--------------------------------------------------------------------- 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]