struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: struts tiles definition in jsp
Date Wed, 02 Mar 2005 08:01:11 GMT
Take a look at this:
And remember that a definitions-config MUST BE an XML that follows the
Tiles configuration DTD.
Antonio Petrelli

Jonathan M Z wrote:

>I am a bit baffled by creating tiles definitions in
>jsp(not XML)
>here is the jsp that tries to use the tiles
><%@ taglib uri="/WEB-INF/struts-tiles.tld"
>prefix="tiles" %>
><%@include file="../defs/common-defs.jsp"%>
><tiles:insert definition="common.default">
>	<tiles:put name="body" value="calc/Assessment.jsp"/>
>Here is common-defs.jsp
><%@ taglib uri="/WEB-INF/struts-tiles.tld"
>prefix="tiles" %>
><tiles:definition id="common.default"
>page="../layout/defaultLayout.jsp" scope="request">
>	<tiles:put name="header" value="../common/Top.jsp"/>
>	<tiles:put name="menubar"
>	<tiles:put name="footer"
>Now I did two things
>1) nothing more
>in my struts-config I inserted
>className="org.apache.struts.tiles.TilesPlugin" >
>	<set-property property="definitions-config"
>	<set-property property="definitions-debug" value="2"
>	<set-property property="definitions-parser-details"
>	<set-property property="definitions-parser-validate"
>	<set-property property="moduleAware" value="true"/>
>notice that it points to a jsp page, not an XML
>In the first case struts complained:
>SRVE0068E: Could not invoke the service() method on
>servlet /calc/AssessmentCalc.jsp. Exception thrown :
>javax.servlet.ServletException: Can't get definitions
>factory from context.
>	at
>In the second case struts complained:
>[3/1/05 12:49:04:649 PST] 00000045 Digester      E
>Parse Fatal Error at line 3 column 2: The markup in
>the document preceding the root element must be
>So how am I suppose to config the tiles definition
>properly in a jsp page and use it properly?
>thank you for the help

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message