Hi all,

Thanks for you help.

I tried to convert my struts application to support multiple languages.  However, it 
seems to me that application is not picking up the language setting set in IE (google 
does show up in Spanish, though).   However, If I use setLocale in my LogonAction, the 
application does display the Spanish text (specified in 
ApplicationResources_es.properties) correctly.

These are the steps that I did:
1) Put ApplicationResources.properties and ApplicationResources_es.properties under 
WEB-INF/resources
2) Put a content type UTF-8 declaration on top of all JSPs
3) Put (Craig/Apache)'s SetCharaceterEncodingFilter.java under filters in src.
4) Put the mapping of filter for ActionServlet in web.xml
5) Change the language of IE to spanish (the Google page does show up in Spanish).
6) Also tried to set the Locale in session in LogonAction.execute(), in which case, it 
picks up the correct file


I am detailing the directory structure below, in case someone thinks it could be the 
issue.

.ear
|____.war
|        |______servlet classes (some modules use HttpServlets)
|        |______filters
|                      |___SetCharaceterEncodingFilter
|____.jar
         |______com.fdt.lcp.* (actions/forms/models/daos/ejbs/utils)

 
The struts.jar is not a part of the ear file.  It is under appserver/lib directory.  
The Struts application runs fine, but internationalization is not working.

thanks a bunch,

Amrinder

PS: This the change that I made to my web.xml to put filter mapping for action:

<!-- Filter to set character encoding on each request -->
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>

<!-- Define filter mappings for the defined filters -->
<filter-mapping>
<filter-name>Set Character Encoding</filter-name>
<servlet-name>action</servlet-name>
</filter-mapping>

     

Reply via email to