Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-1999

Struts2+Sitemesh+FreeMarker: Web page not display complete

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8
    • None
    • Plugin - Mechanism
    • None
    • Struts2+Sitemesh+FreeMarker

    • Patch

    Description

      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());

      to:
      res.setContentLength(-1);
      template.process(model, res.getWriter());

      can resovled this problem.

      Maybe there are more greater ways to resovled this problem.

      Attachments

        Activity

          People

            mrdon Donald J. Brown
            firmgoal Firm Goal
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: