struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Firm Goal (JIRA)" <>
Subject [jira] Created: (WW-1999) Struts2+Sitemesh+FreeMarker: Web page not display complete
Date Mon, 18 Jun 2007 02:53:26 GMT
Struts2+Sitemesh+FreeMarker:  Web page not display complete

                 Key: WW-1999
             Project: Struts 2
          Issue Type: Bug
          Components: Plugins
    Affects Versions: 2.0.8, 2.0.7, 2.0.6, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0
         Environment: Struts2+Sitemesh+FreeMarker
            Reporter: Firm Goal

If the bedecorated page has set response content-length, the Sitemesh FreeMarker Plugins will
use this content-length, so the result page's content length will equals to the bedecorated
page's length, then the web page not display complete.

Modifiy FreeMarkerPageFilter:

Line 157:
template.process(model, res.getWriter());

CharArrayWriter arrayWriter = new CharArrayWriter(page.getContentLength()); 
template.process(model, arrayWriter); 
res.getWriter().write(arrayWriter.toCharArray(), 0, arrayWriter.toCharArray().length); 

can resovled this problem.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message