[
http://www.stripesframework.org/jira/browse/STS-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Gunter closed STS-169.
--------------------------
> StripesRequestWrapper's characterEncoding is null,it causes worng charater
> Encoding
> ------------------------------------------------------------------------------------
>
> Key: STS-169
> URL: http://www.stripesframework.org/jira/browse/STS-169
> Project: Stripes
> Issue Type: Bug
> Affects Versions: Release 1.2.2
> Environment: windows xp sp2 firefox1.5 and IE6.0
> stripes1.2.2
> Reporter: cleverpig
> Assignee: Tim Fennell
> Fix For: Release 1.4
>
>
> StripesRequestWrapper's characterEncoding is null,it causes worng charater
> Encoding.
> When make a simple jsp page for input multi-byte characters(like chinese or
> korean),i got wrong charater encoding page.
> My page code:
> <%@ page contentType="text/html;charset=GBK" language="java"
> pageEncoding="GBK"%>
> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
> <html>
> <body>
> <stripes:form name="smeuse_modi_form"
> action="/business/smeUserManager.action">
> <stripes:text name="smeUser.companyName"/>
> <stripes:text name="smeUser.userName"/>
> </stripes:form>
> </body>
> </html>
> When i looked my web.xml file and found it is correctly with
> LocalePicker.Locales definition:
> <init-param>
> <param-name>LocalePicker.Locales</param-name>
> <param-value>zh_CN</param-value>
> </init-param>
> So I opened stripes1.2.2 source code,looked for
> net.sourceforge.stripes.controller.StripesFilter:
> public void doFilter(ServletRequest servletRequest,
> ServletResponse servletResponse,
> FilterChain filterChain) throws IOException,
> ServletException {
> HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
> try {
> // Pop the configuration into thread local
> StripesFilter.configurationStash.set(this.configuration);
> // Figure out the locale to use, and then wrap the request
> Locale locale =
> this.configuration.getLocalePicker().pickLocale(httpRequest);
> StripesRequestWrapper request = wrapRequest(httpRequest);
> request.setLocale(locale);
> log.info("LocalePicker selected locale: ", locale);
> log.info("request's characterEncoding:: ",
> request.getCharacterEncoding());
> request.setCharacterEncoding("GBK");//----It's What I modified
> // Execute the rest of the chain
> flashInbound(request);
> filterChain.doFilter(request, servletResponse);
> }
> finally {
> // Once the request is processed, take the Configuration back out
> of thread local
> flashOutbound(httpRequest);
> StripesFilter.configurationStash.remove();
> }
> }
> After modified source code,the charater encoding is correctly.But it's not
> good way which I modify this by hard-code manner.
> I hope Tim check this problem.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development