Hi,
I am trying to make a tiles on my main page called main.jsp. This is what I
put in my tile-defs.xml file, in the same dir as struts-config.xml :
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
<!-- Tiles definitions -->
<tiles-definitions>
<definition name="main" path="main.jsp">
<put name="title" value="Example de Tiles" />
<put name="header" value="/header.jsp" />
<put name="footer" value="/footer.jsp" />
<put name="body" value="/body.jsp" />
</definition>
</tiles-definitions>
And then I configure the plug-in in struts-config.xml
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tile-defs.xml"/>
</plug-in>
Finally I use this code in my main.jsp page :
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<hmtl:html>
<head>
<title><tiles:getAsString name="title"/></title>
</head>
<body>
<tiles:insert beanName="main" flush="true" />
</body>
</html:html>
When I launch Tomcat I get messages that the tiles are loaded with the
plug-in, but once I try to display the page I get this exception :
org.apache.jasper.JasperException: Error - tag.getAsString : component
context is not defined. Check tag syntax
I check my tag syntax but I don't see what's wrong or missing. Help greatly
appreciated
Raphael
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
|