Dawid van der Merwe created FREEMARKER-59:
---------------------------------------------

             Summary: include_page directive does not work in weblogic
                 Key: FREEMARKER-59
                 URL: https://issues.apache.org/jira/browse/FREEMARKER-59
             Project: Apache Freemarker
          Issue Type: Improvement
          Components: engine, jsp
    Affects Versions: 2.3.26-incubating, 2.3.25-incubating, 2.3.24-incubating
         Environment:  java 8 / weblogic 12.2.1.2
            Reporter: Dawid van der Merwe


The include_page directive implemented in freemarker.ext.servlet.IncludePage 
does not handle jsp includes correctly in weblogic 12c (only version tested).

This seems to be because the HttpServletResponseWrapper (wrappedResponse) 
created on IncludePage.java (line 105) only overrides getWriter() and not 
getOutputStream(). Weblogic jsp's seem to write to the response's servlet 
output stream and not its writer.

The effect is that the output of the jsp is written directly to the response's 
output and not to the freemarker environment's output.

I corrected the behaviour by also overriding  getOutputStream() and using 
commons-io's WriterOutputStream to convert the stream's bytes.

I can provide my (hasty) patch if required.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to