i have a simple question. i have a default template DefaultLayout.jsp with the following <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <html> <body> <tiles:insert attribute="header"/> <tiles:insert attribute="left"/> <tiles:insert attribute="body"/> <tiles:insert attribute="footer"/> </body> </html> and in the index.jsp page i used somethinglike this <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> <tiles:insert page="/DefaultLayout.jsp" flush="true"> <tiles ut name="header" value="/Header.jsp" /> <tiles ut name="left" value="LeftBar.jsp" /> <tiles ut name="body" value="/Customer.jsp" /> <tiles ut name="footer" value="/Footer.jsp" /> </tiles:insert> Now i have a login.jsp file taht has two elements user name text field and pasword text field. So when i click on the login hyperlink how can i put Login.jsp in the body instead of customer. its a bit confusing. Where should i define the tiles put tag where the body is set to Login.jsp I hope i am clear in stating the problem Thanks
Kim Lilienfeld
Greenhorn
Joined: Apr 13, 2004
Posts: 25
posted
0
Hi There
You need to create a tiles-defs.xml which will look something like this
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration//EN" "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">