Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006160 [Resin] minor always 05-02-18 13:17 05-02-18 15:13
Reporter wileysaw View Status public  
Assigned To ferg
Priority normal Resolution no change required  
Status closed   Product Version 4.0.55
Summary 0006160: <character-encoding> not set with @include in JSP pages
Description We have many pages with Spanish text that include a common header file. For example, page1.jsp has <%@include file=”header.jsp” %>, which is followed by String literals in Spanish.

 

header.jsp includes a page directive to set the charset to UTF-8. <%@page contentType="text/html; charset=UTF-8" %>. This worked fine in Resin 3. In Resin 4, the Spanish accented text will be displayed incorrectly. However, if I place the page directive in page1.jsp, then it will work.

Regardless where the page directive is, in the generated java file, this same line is added:

response.setContentType(“text/html; charset=UTF-8”);

Looking at the encoded literals, it looks like ISO-8859-1 is used when the page directive is in header.jsp and UTF-8 is used when the page directive is in page1.jsp. For example, one same accented character are encoded these two ways:

\u00c3\u00a9 -- displayed incorrectly.
\u00e9 --> displayed correctly

 

According to the help doc, Resin uses ISO-8859-1 as the default encoding, so I added <character-encoding>utf-8</character-encoding> in resin.xml (tried globally and in the web-app). It had no effect.
Additional Information Workaround:
Add <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> to each of the erroneous JSP pages
Attached Files

- Relationships

- Notes
(0006834)
ferg
05-02-18 15:13

This change was a JSP compliance fix for Resin 4.
 

- Issue History
Date Modified Username Field Change
05-02-18 13:17 wileysaw New Issue
05-02-18 15:13 ferg Note Added: 0006834
05-02-18 15:13 ferg Assigned To  => ferg
05-02-18 15:13 ferg Status new => closed
05-02-18 15:13 ferg Resolution open => no change required
05-03-18 10:08 qiao Issue Monitored: qiao


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
31 total queries executed.
27 unique queries executed.
Powered by Mantis Bugtracker