I'm fairly new to struts and tiles and am trying to find a way to include a form that will submit a struts action as part of a tiles page. For example I have a tiles page made up of 4 other jsps - header.jsp, footer.jsp, body.jsp and menu.jsp. I would like body.jsp to include a simple form as follows:
Please enter scientific name
<html:form action="simplequery.do">
<html:text property="sciname" />
<html:submit value="submit query" />
</html:form>
however I cannot get it to register the struts taglib uri's on this page. I have tried including them at the top of the homepage and at the top of the layout page as shown underneath, but to no avail. Where should I be placing these tags, or is it just an impossible dream? I am using the netbeans 5.0 ide at the moment.
-----------Homepage-----------
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<tiles:insert page="layout.jsp" flush="true">
<tiles:put name="title" value="Using Tiles" />
<tiles:put name="header" value="header.jsp" />
<tiles:put name="footer" value="footer.jsp" />
<tiles:put name="body" value="body.jsp" />
<tiles:put name="menu" value="menu.jsp" />
</tiles:insert>
-----------Layout page-----------
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<head>
<title><tiles:getAsString name="title"/></title>
</head>
<body>
<table width="100%">
<tr>
<td colspan="2">
<tiles:insert attribute="header" />
</td>
</tr>
<tr>
<td width="150">
<tiles:insert attribute="menu" />
</td>
<td>
<tiles:insert attribute="body" />
</td>
</tr>
<tr>
<td colspan="2">
<tiles:insert attribute="footer" />
</td>
</tr>
</table>
</body>
</html>