[JIRA] Created: (STS-913) Weblogic-hack doesn't use the chosen encoding

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[JIRA] Created: (STS-913) Weblogic-hack doesn't use the chosen encoding

JIRA jira@stripesframework.org
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
Tested from Eclipse Kepler
            Reporter: Ulrik Skovenborg
            Priority: Minor
         Attachments: StripesBug.war

I have chosen the iso-8859-1 encoding in my web.xml:
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}}:
final HttpServletResponse response = new HttpServletResponseWrapper(
                (HttpServletResponse) pageContext.getResponse()) {
            public String getCharacterEncoding() {
                return os.getCharset();

            public void setCharacterEncoding(String charset) {

            public ServletOutputStream getOutputStream() throws IOException {
                return os;

            public PrintWriter getWriter() throws IOException {
                return writer;

                .include(pageContext.getRequest(), response);

{{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!
Stripes-development mailing list
[hidden email]