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: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



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

Reply via email to