You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/04/07 22:20:47 UTC

DO NOT REPLY [Bug 28269] New: - String Buffer bug with Tiles

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28269>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28269

String Buffer bug with Tiles

           Summary: String Buffer bug with Tiles
           Product: Struts
           Version: 1.1 Final
          Platform: All
               URL: http://www.attask.com
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Tiles framework
        AssignedTo: dev@struts.apache.org
        ReportedBy: scott@attask.com


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.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org