Posted by: bgopi | November 7, 2014

UTF-8 characters in upload filename issue in spring mvc multipartresolver

Please add defaultEncoding property to your multipartresolver definition, as shown below.

<bean id=”multipartResolver” class=”org.springframework.web.multipart.commons.CommonsMultipartResolver”>

<property name=”defaultEncoding” value=”utf-8″/>
</bean>

check your servlet filter if you have one, you can try setting request.setCharEncoding(“UTF-8″) in your filter.

you should have meta content type tag defined in your jsp, as shown below

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>

you may try, character-encoding=”utf-8″ for your spring form definition.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: