This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Spring and the fly likes Spring MVC UTF-8 encoding problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring MVC UTF-8 encoding problem" Watch "Spring MVC UTF-8 encoding problem" New topic

Spring MVC UTF-8 encoding problem

vamsi kris

Joined: Feb 04, 2009
Posts: 28

HI All,

I am facing a weird problem with charset in my spring mvc application.

I have used a single MultiactionController for all views. Separate Form controllers for each form in my application.

For each jsp, I am using i have explicitly set the charset and pageEncoding to UTF-8. I have set the charsetEncodingFilter with encoding param as UTF-8.

My problem is all my forms are in UTF-8 and all my views from multiactionController are in ISO-8859-1. I have tried explicitly setting the responseHeaders, contentType to UTF-8. but noting worked.

Is this a framework issue with Spring 2.5.
I am using Spring 2.5, Hibernate 3 and jQuery for my development.

Filter code in my web.xml

code from my jps,

explicitly set the responseContentType in my MultiActionController

Is there any mistake in my configuration ?

Please give me a solution, why is it only problem with my views(form less jsps) but not with my forms ?
Is this the problem with controllers.


SCJP 1.5 97%
I agree. Here's the link:
subject: Spring MVC UTF-8 encoding problem