You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Scott Johnson <sc...@yahoo.com> on 2004/04/07 01:40:12 UTC
tile String Buffer bug?
When sending an empty tiles:put, struts displays an
uncleared string buffer from a previous request (not
necessarily even the same application)!
This can be replicated with two simple files:
testLayout.jsp and testPage.jsp. Just paste these two
code samples into corresponding pages and drop into
your application container...
testLayout.jsp:
<%@ taglib uri="/layouts/struts-tiles.tld"
prefix="tiles" %>
<HTML>
<HEAD>
<TITLE>BUG</TITLE>
</HEAD>
<BODY>
Section 1----------<BR>
<tiles:getAsString name="section1"/>
<BR>================<BR>
Section 2----------<BR>
<tiles:getAsString name="section2"/>
</BODY>
</HTML>
testPage.jsp
<%@ taglib uri="/layouts/struts-tiles.tld"
prefix="tiles" %>
<tiles:insert page="testLayout.jsp" flush="true">
<tiles:put name="section1"></tiles:put>
<tiles:put name="section2">
This is section 2. The current system time is <%=
System.currentTimeMillis() %>
</tiles:put>
</tiles:insert>
When you hit testPage.jsp and then reload, you will
your last section 2's content in section 1.
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org