You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jee Tzee Ming <ja...@hotmail.com> on 2003/01/15 16:26:50 UTC
Define tile definition
I have added the following to struts-config.xml
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
I have got the tiles-defs.xml in the web-inf directory which got the
following lines:
<definition name="mainLayout" path="/layout/classicLayout.jsp">
<put name="title" value="Tiles Library Documentation" />
<put name="header" value="/common/header.jsp" />
<put name="menu" value="/common/menu.jsp" />
<put name="footer" value="/common/footer.jsp" />
<put name="body" value="/common/body.jsp" />
</definition>
i have got an index.jsp which got the following line:
<tiles:insert definition="mainLayout" flush="true"/>
but it gave me error saying: Can't get definitions factory from context. Did
i use the definition correctly? Is it definition="mainLayout" that i should
used?
if i change the index.jsp to contains the following. it works fine
<tiles:insert page="/layout/classicLayout.jsp">
<tiles:put name="title" value="Tiles Library Documentation" />
<tiles:put name="header" value="/common/header.jsp" />
<tiles:put name="menu" value="/common/menu.jsp" />
<tiles:put name="footer" value="/common/footer.jsp" />
<tiles:put name="body" value="/common/body.jsp" />
</tiles:insert>
Anyone got any ideas where i went wrong? Thanks in advance
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Define tile definition
Posted by Cedric Dumoulin <ce...@apache.org>.
The error message indicate that the definition factory has fail to
start. Check the servlet logs, and your tiles-defs.xml files. Have you
put the appropriate headers in this later file ?
Cedric
Jee Tzee Ming wrote:
> I have added the following to struts-config.xml
>
> <plug-in className="org.apache.struts.tiles.TilesPlugin" >
> <set-property property="definitions-config"
> value="/WEB-INF/tiles-defs.xml" />
> <set-property property="moduleAware" value="true" />
> <set-property property="definitions-parser-validate" value="true" />
> </plug-in>
>
> I have got the tiles-defs.xml in the web-inf directory which got the
> following lines:
>
> <definition name="mainLayout" path="/layout/classicLayout.jsp">
> <put name="title" value="Tiles Library Documentation" />
> <put name="header" value="/common/header.jsp" />
> <put name="menu" value="/common/menu.jsp" />
> <put name="footer" value="/common/footer.jsp" />
> <put name="body" value="/common/body.jsp" />
> </definition>
>
> i have got an index.jsp which got the following line:
>
> <tiles:insert definition="mainLayout" flush="true"/>
>
>
> but it gave me error saying: Can't get definitions factory from
> context. Did i use the definition correctly? Is it
> definition="mainLayout" that i should used?
>
> if i change the index.jsp to contains the following. it works fine
>
> <tiles:insert page="/layout/classicLayout.jsp">
> <tiles:put name="title" value="Tiles Library Documentation" />
> <tiles:put name="header" value="/common/header.jsp" />
> <tiles:put name="menu" value="/common/menu.jsp" />
> <tiles:put name="footer" value="/common/footer.jsp" />
> <tiles:put name="body" value="/common/body.jsp" />
> </tiles:insert>
>
> Anyone got any ideas where i went wrong? Thanks in advance
>
>
>
>
>
>
>
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*
> http://join.msn.com/?page=features/virus
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>