Weblogic-hack doesn't use the chosen encoding
---------------------------------------------

                 Key: STS-913
                 URL: http://www.stripesframework.org/jira/browse/STS-913
             Project: Stripes
          Issue Type: Bug
          Components: Tag Library
    Affects Versions: Release 1.5.7
         Environment: Windows 7 Pro
Weblogic 10.3.6.0
Tested from Eclipse Kepler
            Reporter: Ulrik Skovenborg
            Priority: Minor
         Attachments: StripesBug.war

I have chosen the iso-8859-1 encoding in my web.xml:
{code}
<init-param>
  <param-name>LocalePicker.Locales</param-name>
  <param-value>en:iso-8859-1</param-value>
</init-param>
{code}
I would expect this to apply throughout the whole system (or at least the 
Stripes-part of it) but the Weblogic-hack added in 1.5.7 (due to STS-823 and 
STS-834) always defaults to UTF8.

This is probably because the StripesFilter only applies to the REQUEST 
dispatcher type but the Weblogic-hack is only used in INCLUDE's. This 
code-snippet was found in {{net.sourceforge.stripes.tag.layout.LayoutContext}}:
{code}
final HttpServletResponse response = new HttpServletResponseWrapper(
                (HttpServletResponse) pageContext.getResponse()) {
            @Override
            public String getCharacterEncoding() {
                return os.getCharset();
            }

            @Override
            public void setCharacterEncoding(String charset) {
                os.setCharset(charset);
            }

            @Override
            public ServletOutputStream getOutputStream() throws IOException {
                return os;
            }

            @Override
            public PrintWriter getWriter() throws IOException {
                return writer;
            }
        };

        pageContext.getRequest().getRequestDispatcher(relativeUrlPath)
                .include(pageContext.getRequest(), response);
{code}

{{setCharacterEncoding}} is invoked on the ServletResponse in the 
StripesFilter, but since the filter is only used one time per request it makes 
no difference.

The Stripes.war contains a simple application where bug can be reproduced. 
Beware that it's the same war-file as STS-912 so don't push the button or you 
will get stucked :-)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to