struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Johnson <scj...@yahoo.com>
Subject tile String Buffer bug?
Date Tue, 06 Apr 2004 23:40:12 GMT
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


Mime
View raw message