For help with installation, bugs reports or feature requests, please head over to our new forums.
	
Genuitec Community on GitHub
- This topic has 4 replies, 2 voices, and was last updated 21 years, 1 month ago by Riyad Kalla. 
- 
		AuthorPosts
- 
		
			
				
 alashoofiMemberHere is my problem: 
 When I add this piece into struts-config.xml, I get errors;******** 
 <plug-in className=”org.apache.struts.tiles.TilesPlugin”>
 <set-property property=”definitions-config” value=”/WEBINF/tiles-defs.xml” />
 <set-property property=”moduleAware” value=”true” />
 <set-property property=”definitions-parser-validate” value=”true” />
 </plug-in>
 *********The error is: 
 The content of element type, strus-config, must match.Is there another way of adding the TilesPlugin without generating an error. I add the TilesPlugin so I can use Tiles in my web app. Thanks 
 [/b]- System Setup ——————————-
 Operating System and version: XP Pro
 Eclipse version: 3.0
 Eclipse build id:
 Fresh Eclipse install (y/n): y
 If not, was it upgraded to its current version using the update manager?
 Other installed external plugins: myeclipse
 Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 8
 MyEclipse version: 3.8 beta 2
 Eclipse JDK version:
 Application Server JDK version: Tomcat 4.1
 Are there any exceptions in the Eclipse log file?– Message Body ——————————- September 6, 2004 at 10:05 pm #214649
 Riyad KallaMemberIt all depends on where in the file you are adding it, order in the struts-config file matters. If you look at the rest of that error: “must match…” it will show you the order of the elements. <plug-in> elements needs to come at the bottom of the struts-config file generally. September 6, 2004 at 10:40 pm #214652
 alashoofiMemberThanks Riyad, I stumbled on that info the hard way a few minutes ago. I am very new to Tiles, so bear with me! 
 Now I don’t get that error anymore but I get another runtime error:org.apache.jasper.JasperException: Can’t get definitions factory from context. My /jsp/siteLayout.jsp looks like so: ************************************ <%@ page language=”java”%> <%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean” prefix=”bean” %> 
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-html” prefix=”html” %>
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-logic” prefix=”logic” %>
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-tiles” prefix=”tiles” %>
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-template” prefix=”template” %>
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-nested” prefix=”nested” %><HTML> 
 <HEAD>
 <title><tiles:getAsString name=”title” ignore=”true”/></title>
 <html:base/>
 </HEAD>
 <body>
 <table width=”500″ border=”0″ cellspacing=”0″ cellpadding=”0″><tr bgcolor=”#36566E”> 
 <td height=”68″ width=”48%”>
 <div align=”left”>
 <img src=”images/struts-power.gif”
 width=”220″ height=”74″>
 </div>
 </td>
 </tr><tr> 
 <td height=”68″ width=”2000″>
 <tiles:insert attribute=”header” ignore=”true”>
 <tiles:put name=”title”
 beanName=”title” beanScope=”tile”/>
 </tiles:insert>
 </td>
 </tr>
 <tr>
 <td>
 <div align=”center”>
 <tiles:insert attribute=”content”/>
 </div>
 </td>
 </tr>
 <tr>
 <td>
 <tiles:insert attribute=”footer” ignore=”true”/>
 </td>
 </tr></table> <font color=”#FF0000″ > 
 <!– DebugUtil.debug(pageContext); –>
 </font>
 </body>
 </HTML>
 *************************************The WEB-INF/tiles-def.xml looks like so: *************************** 
 <?xml version=”1.0″ encoding=”UTF-8″?>
 <tiles-definitions><definition name=”siteLayoutDef” path=”/jsp/siteLayout.jsp”> 
 <put name=”title” value=”Alashoofi Choices System” />
 <put name=”header” value=”jsp/header.jsp” />
 <put name=”footer” value=”jsp/footer.jsp” />
 <put name=”content” type=”string”>
 Content goes here
 </put>
 </definition></tiles-definitions> 
 *****************************The /jsp/footer.jsp like so: ************************** 
 br />
 <br />
 <br />
 <br />
 <br />
 <br />
 <br />
 <br />
 <br /><center> 
 <table>
 <tr>
 <td width=”100%” bgcolor=”#36566E”>
 Copyright Wrox Corp 2003
 </td>
 </tr>
 </table>
 </center>
 **************************And the /jsp/header.jsp like: 
 *******<%@ page language=”java”%> <%@ taglib uri=”http://jakarta.apache.org/struts/tags-bean” prefix=”bean” %> 
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-html” prefix=”html” %>
 <%@ taglib uri=”http://jakarta.apache.org/struts/tags-logic” prefix=”logic” %>
 <%@ taglib uri=”/WEB-INF/struts-tiles.tld” prefix=”tiles” %><center> 
 <table>
 <tr><td width=”33%”> 
 <font color=”#36566E”>
 <tiles:getAsString name=”title” ignore=”true”/>
 </font>
 </td></tr> 
 </table>
 </center>****************** What am I doing wrong? Thanks a bunch!!! September 7, 2004 at 2:27 am #214660
 alashoofiMemberI was able to figure it out. My definition was not in sync. 
 Thanks for being there everybody, I’m sure I will be needing more help.September 7, 2004 at 9:18 am #214675
 Riyad KallaMemberGlad you got it, thanks for following up with us. 
- 
		AuthorPosts

