Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Spanish characters

Shuai Zheng

2007-02-15

Replies:

Add the following line into your web.xml

<filter>
<filter-name>SetCharacterEncoding</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter
</filter-class>
<init-param>
 <param-name>encoding</param-name>
 <param-value>UTF-8</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>SetCharacterEncoding</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SetCharacterEncoding</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>

BTW: spring.jar must in your class path.

Regards,

Zheng Shuai

On 2/15/07, Juan Espinosa <pcexplorer@(protected):
>
>
> Hi, im having problems in my web application displaying spanish characters
> Anyone knows what i have to configure to work this properly
>
> For example if i put in a inputbox a Ñ character and submit that, then
> when
> the action
> returns to the "input" it show strange characters like ??? Or !!! in the
> input box...
>
> Thanks
>
> Juan Espinosa
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.441 / Virus Database: 268.17.39/687 - Release Date:
> 14/02/2007
> 16:17
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.