Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8439647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:03:26+00:00 2026-06-10T08:03:26+00:00

I am working on a Spring JSR 286 Portlet application. The locale is driven

  • 0

I am working on a Spring JSR 286 Portlet application. The locale is driven by a default language setting that is loaded upon login.

I then need to do currency formatting through the portlet. For example, I do the following:

<fmt:setLocale value="en_IE" />
result: <fmt:formatNumber type="currency" value="324.00" currencyCode="EUR" />

(Normally, all these values are set dynamically.)

This produces a fine result as I go through the normal operation.

result: €324.00 

Except, in the application, when I do a @ResourceMapping request. In this case, and here only, I get:

result: ?324.00

I’ve got the same two lines in the jsp’s that render for RenderRequests and in the jsp’s that render for ResourceRequests. But regardless of what I do, it always fails to produce clean output as part of a ResourceRequest.

Any ideas as to what could be causing the inconsistency?


2nd EDIT:

Following on +BalusC ‘s 2nd comment, I put the following into the jsp:

<% System.out.println("Response Char Encoding: " + response.getCharacterEncoding());  %>

For regular requests where, it works, I get:

SystemOut O Response Char Encoding: UTF-8

For Render Requests, where it doesn’t work, I get:

SystemOut O Response Char Encoding: ISO-8859-1

So, yes, as predicted, this is a character encoding issue.

—

EDIT 3:

So, the issue is how to set a character encoding of UTF-8 in Spring on a ResourceResponse.

Putting in a page directive of <%@page pageEncoding="UTF-8"%> doesn’t override the default encoding seen above. The methods for building this directly into Spring are complicated hacks (see Spring Encoding with CharacterEncodingFilter in web.xml ), and given that I have only a handful of Resource Request methods, it seems the easiest way is to just put

response.setCharacterEncoding("UTF-8");

into those methods.

Would appreciate any other suggestions, especially if I’m wrong about how to more easily put this into Spring.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:03:29+00:00Added an answer on June 10, 2026 at 8:03 am

    My final resolution to this was in Edit #3 above. To just hardcode

    response.setCharacterEncoding("UTF-8");
    

    into the 2 ResourceResponse methods.

    If you have more extensive resource requests and need a comprehensive solution, follow the links in the question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working with an incorrectly built spring application. Rather than use IOC, objects that
I am building a Spring MVC web application that uses JSR-303 validation. With the
I am working on Spring-Hibernate-Websphere application and sybase as database. Following is the code
I've try to implement integration tests for a working application (spring, hibernate, soap, cxf).
i am working on a spring 3 web service application and on it i
I am working on a Spring Web Project that we are using Subversion, Eclipse
I'm writing web application that uses Spring MVC to bind Spring beans with REST-like
Currently working on a Spring 2.5 web application, looks as if the business has
I am working on a Spring application using Tomcat 6 and Spring 2.5 .
I am working to configure Spring-Security with an existing application, for just basic security

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.