struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Dumoulin <cedric.dumou...@lifl.fr>
Subject Re: tiles newbie problem
Date Mon, 01 Oct 2001 10:08:21 GMT

  Hi,

  There was a problem preventing Tiles to run correctly with latest
commons-digester. This is now corrected.
  The error "Can't get component definition ..." usually happen when no definitions
exist, or when ActionServlet fails to start. In this later case, you can check
servlet log to see error (or acknowledge).

  The servlet can fail to start because bad jaxp (1.1 is required), bad validation,
...
  The validation can be turned on/off in web.xml :

    <init-param>
      <param-name>definitions-parser-validate</param-name>
      <param-value>true</param-value>
    </init-param>

If turned on, you should provide a DOCTYPE declaration :

 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

  Take care that the name after DOCTYPE is the name of your root element. With
Tiles, it can be 'tiles-definition' or 'component-definitions'.

  When you turn on the definition debug, you should have in the output console, on
servlet startup, a big print with all your definitions . Also, you should have a
trace of all 'inserted' definitions/tiles when loading a page.

   Cedric


Nathan Coast wrote:

> Hi, I believe I have everything set up correctly - fairly obviously I don't.
>
> I have a simple page:
>
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
>
> <tiles:insert definition="mypage" flush="true" />
>
> but when I browse to the page I get this error:
>
> javax.servlet.jsp.JspException: Error -  Tag Insert : Can't get component
> definition 'mypage'. Check if this name exist in component definitions.
> at org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193)
>
> I think struts config is set up correctly and referring to the correct
> tilesDefinitions.xml and that file contains this:
>
>    <definition name="mypage" path="/pages/layout/columnsLayout.jsp">
>      <put name="numCols" value="2" />
>      <putList name="list0" >
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>      </putList>
>      <putList name="list1" >
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>        <add value="/pages/mylevelseas/comments.jsp" />
>      </putList>
>    </definition>
>
> yes I know all of the componenets are the same I'm just trying to achieve hello
> world :)
>
> Also I have debug turned on in web.xml:
>
>     <init-param>
>        <param-name>definitions-debug</param-name>
>        <param-value>1</param-value>
>      </init-param>
>
> I'm not seeing any tiles specific degug.  what debug should I expect to see?
>
> Thanks Nathan


Mime
View raw message