Hi,

2008/6/9 Raghuveer <[EMAIL PROTECTED]>:

> Is it possible in struts to configure the controller to read the
> application
> resource file which is saved as UTF8 format?
>

You can use filter from Spring

    <filter>
        <filter-name>encodingFilter</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>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>


    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

It is possible to save the notepad file in UTF8 instead of ANSII.


If such notepad support UTF-8, you can use Notepad++ or JDK tool
native2ascii which will convert ANSII file to UTF-8, there is also ant task
available or many IDEs support such convertion in fly


Regards
-- 
Lukasz
http://www.lenart.org.pl/

Reply via email to