[
https://issues.apache.org/struts/browse/TILES-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bips Sadhwani updated TILES-290:
--------------------------------
Description:
I have this wierd issue with tiles. Probably its a bug.
I am trying to insert a tile (a jsp page) into another tile (a jsp page) and so
this is my config (simplified):
tiles.xml
---------
<definition name="rootPage.index" template="layout.jsp">
<put-attribute name="pagetitle" value="Page Body Title" />
<put-attribute name="header" value="header.jsp" />
<put-attribute name="footer" value="footer.jsp" />
</definition>
<definition name="searchEmployee.index" extends="rootPage.index">
<put-attribute name="body" value="searchEmpBody.index" />
</definition>
<definition name="searchEmpBody.index"
template="/searchEmployee.jsp"/>
</definition>
<definition name="status.index" template="/status.jsp">
</definition>
layout.jsp
-----------
<body>
<div class="container">
<div id="header">
<tiles:insertAttribute name="header" />
</div>
<div id="mainContent">
<tiles:insertAttribute name="body" />
</div>
</div>
</body>
Now following are the things I try on my searchEmployee.jsp
searchEmployee.jsp - This works
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<tiles:insertDefinition name="status.index"/>
searchEmployee.jsp - This also works
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
<tiles:getAsString name="pagetitle"/>
</s:form>
searchEmployee.jsp - This does work (only if I use tiles:insertDefinition below
s:form)
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
</s:form>
<tiles:insertDefinition name="status.index"/>
searchEmployee.jsp - This does NOT work (if I use tiles:insertDefinition above
or within s:form things don't work)
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
<tiles:insertDefinition name="status.index"/>
</s:form>
I get a long exception stack trace which basically says nullptrexception.
I've done the same thing using tiles1.x and it has always worked.
Tks
was:
I have this wierd issue with tiles. Probably its a bug.
I am trying to insert a tile (a jsp page) into another tile (a jsp page) and so
this is my config (simplified):
tiles.xml
---------
<definition name="rootPage.index" template="layout.jsp">
<put-attribute name="pagetitle" value="Page Body Title" />
<put-attribute name="header" value="header.jsp" />
<put-attribute name="footer" value="footer.jsp" />
</definition>
<definition name="searchEmployee.index" extends="rootPage.index">
<put-attribute name="body" value="searchEmpBody.index" />
<definition name="searchEmpBody.index"
template="/searchEmployee.jsp"/>
</definition>
<definition name="status.index" template="/status.jsp">
</definition>
layout.jsp
-----------
<body>
<div class="container">
<div id="header">
<tiles:insertAttribute name="header" />
</div>
<div id="mainContent">
<tiles:insertAttribute name="body" />
</div>
</div>
</body>
Now following are the things I try on my searchEmployee.jsp
searchEmployee.jsp - This works
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<tiles:insertDefinition name="status.index"/>
searchEmployee.jsp - This also works
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
<tiles:getAsString name="pagetitle"/>
</s:form>
searchEmployee.jsp - This does work (only if I use tiles:insertDefinition below
s:form)
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
</s:form>
<tiles:insertDefinition name="status.index"/>
searchEmployee.jsp - This does NOT work (if I use tiles:insertDefinition above
or within s:form things don't work)
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<s:form action="listEmployees">
<tiles:insertDefinition name="status.index"/>
</s:form>
I get a long exception stack trace which basically says nullptrexception.
I've done the same thing using tiles1.x and it has always worked.
Tks
> nested tiles problem
> --------------------
>
> Key: TILES-290
> URL: https://issues.apache.org/struts/browse/TILES-290
> Project: Tiles
> Issue Type: Bug
> Affects Versions: 2.0.6
> Environment: Windows XP Professional, MyEclipse 6.0.1, Struts2, Tiles
> 2.0.6, J2EE 1.4, JDK 5.0, JBoss 4.2.2
> Reporter: Bips Sadhwani
>
> I have this wierd issue with tiles. Probably its a bug.
> I am trying to insert a tile (a jsp page) into another tile (a jsp page) and
> so this is my config (simplified):
>
> tiles.xml
> ---------
>
> <definition name="rootPage.index" template="layout.jsp">
> <put-attribute name="pagetitle" value="Page Body Title" />
> <put-attribute name="header" value="header.jsp" />
> <put-attribute name="footer" value="footer.jsp" />
> </definition>
>
> <definition name="searchEmployee.index" extends="rootPage.index">
> <put-attribute name="body" value="searchEmpBody.index" />
> </definition>
> <definition name="searchEmpBody.index"
> template="/searchEmployee.jsp"/>
> </definition>
>
> <definition name="status.index" template="/status.jsp">
> </definition>
>
> layout.jsp
> -----------
>
> <body>
> <div class="container">
> <div id="header">
> <tiles:insertAttribute name="header" />
> </div>
>
> <div id="mainContent">
> <tiles:insertAttribute name="body" />
> </div>
> </div>
> </body>
> Now following are the things I try on my searchEmployee.jsp
>
> searchEmployee.jsp - This works
> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <tiles:insertDefinition name="status.index"/>
> searchEmployee.jsp - This also works
> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <s:form action="listEmployees">
> <tiles:getAsString name="pagetitle"/>
> </s:form>
> searchEmployee.jsp - This does work (only if I use tiles:insertDefinition
> below s:form)
> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <s:form action="listEmployees">
> </s:form>
> <tiles:insertDefinition name="status.index"/>
> searchEmployee.jsp - This does NOT work (if I use tiles:insertDefinition
> above or within s:form things don't work)
> <%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <s:form action="listEmployees">
> <tiles:insertDefinition name="status.index"/>
> </s:form>
> I get a long exception stack trace which basically says nullptrexception.
> I've done the same thing using tiles1.x and it has always worked.
> Tks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.