Hello List, I started developing with Apache Tiles 2 yesterday and I have a question now. I generated me some tiles (footer, header, common_menu,etc). So now I want to insert some pages, which's content is generated by a servlet. The content is different by the given context. For now my jsp's look like this.
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link href="css/layout.css" type="text/css" rel="stylesheet"> <title>AIS DCL</title> </head> <body> <tiles:insertDefinition name="aisdcl.main" /> </body> </html> The definition in the tiles-defs.xml look like this <definition name="aisdcl.main" template="layouts/layout.jsp"> <put-attribute name="title" value="This is the title2."/> <put-attribute name="header" value="/tiles/banner.jsp"/> <put-attribute name="body" value="/tiles/home_body.jsp"/> <put-attribute name="common_menu" value="/tiles/common_menu.jsp"/> <put-attribute name="contextMenu" value="/tiles/contextMenuBlank.jsp"/> <put-attribute name="footer" value="/tiles/credits.jsp"/> </definition> and the layout.jsp looks like this. <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> <div class="header"><tiles:insertAttribute name="header"/></div> <div id="rahmen"> <div id="menu"><tiles:insertAttribute name = "common_menu"/></div> <div id="menu"><tiles:insertAttribute name = "contextMenu"/></div> </div> <div id="content" align="center"><tiles:insertAttribute name="body"/></div> <div id="footer"><tiles:insertAttribute name="footer"/></div> And it works quiet well. But now I want to insert some ServerSide generated pages. I thought I could use a tile as single, you now this way: <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link href="css/layout.css" type="text/css" rel="stylesheet"> <title>AIS DCL</title> </head> <body> <tiles: PUT HEADER TILE HERE /> <tiles: MENU HERE TILE HERE /> THE CALL TO THE SERVELET GOES HERE <tiles: PUT FOOTER TILE HERE /> </body> </html> But that seems not to work. I've tried it with <tiles:insertAttribute name = "common_menu"/> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <link href="css/layout.css" type="text/css" rel="stylesheet"> <title>AIS DCL</title> </head> <body> <tiles:insertAttribute name = "header"/> <tiles:insertAttribute name = "common_menu"/> THE CALL TO THE SERVELET GOES HERE <tiles:insertAttribute name = "footer"/> </body> </html> But it did'nt work. Does anyone can give me an good example how to insert some NON TILES (in my case only one) between some TILES ???? Thx for suggestions -- View this message in context: http://www.nabble.com/How-to-integrate-Servlet-generates-pages-in-Tiles-2-tp18928638p18928638.html Sent from the tiles dev mailing list archive at Nabble.com.
