Layout tags don't handle huge inserted contents (layout definitions) well, 
usage results in OutOfMemory errors
--------------------------------------------------------------------------------------------------------------

                 Key: STS-391
                 URL: http://mc4j.org/jira/browse/STS-391
             Project: Stripes
          Issue Type: Bug
          Components: Tag Library
    Affects Versions: Release 1.4.3
            Reporter: Karel Kolman
         Assigned To: Tim Fennell


I'm using the Stripes layout tag library and am experiencing difficulties 
rendering huge web pages.
An example structure is the following (/WEB-INF/jsp/content.jsp file generates 
approximately 13 megabytes of data)

<%@ taglib uri="http://stripes.sourceforge.net/stripes.tld"; prefix="stripes" %>
<stripes:layout-render name="/WEB-INF/jsp/layout.jsp">
    <stripes:layout-component name="body-content">
         <!-- either this -->
         <stripes:layout-render name="/WEB-INF/jsp/content.jsp"/>
         <!-- or this -->
         <jsp:include page="/WEB-INF/jsp/content.jsp" flush="true"/>
    </stripes:layout-component>
</stripes:layout-render> 

This results in OutOfMemory errors being thrown (and page not being displayed), 
the server has 512MB of heap space available.

Changing the code in LayoutRenderTag.java from

  BodyContent content = getPageContext().pushBody();
  getPageContext().include(this.name, false);
  getPageContext().popBody();
  getPageContext().getOut().write(content.getString());

to

  getPageContext().include(this.name, false);

I am able to render the large jsp files inside the layout-render tags.

Could this somehow be fixed ? Could you consider adding an additional attribute 
to the layout-render tag that would work without loading the whole contents of 
the inserted subpage into a buffer ?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://mc4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to