I am designing a shopping cart project in which my content area alone changes, so i configured it with struts tiles, and everything worked fine until i encountered forms in my project. when ever i tried to display forms(struts forms) using tiles. the forms didn’t compile it is just coming as such <html:text property="username"/> please help.
My Tiles def is
<tiles-definitions>
<definition name="main-layout" path="/WEB-INF/layout.jsp">
<put name="title" value="" />
<put name="header" value="/WEB-INF/layout/header.jsp"/>
<put name="secmenu" value="/WEB-INF/layout/secmenu.jsp"/>
<put name="menu" value="/WEB-INF/layout/menu.jsp"/>
<put name="content" value=""/>
<put name="footer" value="/WEB-INF/layout/footer.jsp"/>
</definition>
<definition name="index" extends="main-layout">
<put name="title" value="The Mobile Store"/>
<put name="content" value="/WEB-INF/pages/homecontent.jsp"/>
</definition>
<definition name="login" extends="main-layout">
<put name="title" value=":: Login ::"/>
<put name="content" value="/WEB-INF/pages/login.jsp"/>
</definition>
The form i used is
<html:form action="login.html" method="post">
<table align="center" id="logintable">
<tr>
<td>Enter Your UserName : </td>
<td><html:text property="username"/></td>
</tr>
<tr>
<td>Enter Your Password : </td>
<td><html:password property="password"/></td>
</tr>
<tr>
<td colspan="2"><html:submit value="LOGIN"/></td>
</tr>
</table>
</html:form>
I think you are getting the problem since you are trying to access the jsp file which is inside the WEB-INF folder. And if you are trying with struts 1.x try using struts 2.0. for tutorial use this http://viralpatel.net/blogs/struts-2-tiles-plugin-tutorial-with-example-in-eclipse/