Hi everybody, I am using java internalization API in my J2EE web application implemented by struts framework, I defined ApplicationResources.properties files in struts-config.xml file, and a made an action to change Locale, I wrote a filter to set character encoding of request, all my JSP files encoding are UTF-8 but it does not work correctly, has anyone know what can I do to fix it?
struts-config.xml------->I define ApplicationResources.properties web.xml-------->I defined a filter to set encodig of request JSP files------>set Character Encoding of all of them to UTF-8 use <bean:message key="..."/> to show internationalized message Struts Action--->change my Locale to show corresponding message
what should I do then?
posted 9 years ago
You can set up a filter. Add to web.xml:
That means whenever a .do or .jsp is encountered, that it will run the filter com.whatever.EncodingTypeFilter. And here is what that class should look like: