On 15.09.2009 03:35, Vangel V. Ajanovski wrote:
In fact after lot's of debugging it turned out that the problem is again the same as in my other post - bad UTF received from browser after selecting an option. The selection boxes were in fact coded with cyrillic character codes which were received incorrectly from the browser.

So once again I had the same problem, although Tapestry is supposed to work entirely in UTF-8, it does not, and depending on server it receives broken input.

I tried setting JAVA_OPTS="-Djavax.servlet.request.encoding=UTF-8" but it doesn't help.
Did I mention I was using Spring and Spring Security? There filters were possible messing with UTF-8 requests from browser and I found the following solution on several Spring forums, so I mention it also here just for reference.

        <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>



Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to