Hi Joerg,
since you are using struts, why don't you ditch the SetCharacterEncodingFilter and set the character-encoding as a property of the struts controller? This means you also don't need anything in your JSPs.


I assume you are using form-based container-managed authentication as the interface to the JAAS realm. If so, I do not understand how you have a character encoding problem with the login form, since you can just set the character encoding in the JSP as a scriptlet or in HTML as a meta tag.

I stand a few days away from setting up the same configuration myself, albeit without JBoss, so I would be interested in your reply.

HTH,
Adam



On 09/23/2003 11:01 AM Joerg Heinicke wrote:
Hello,

we have a Struts web application, that should use UTF-8 as character encoding. I set the content type for the HTML pages (JSP) as well as the character encoding on the request via the SetCharacterEncodingFilter delivered with Tomcat in the examples webapp. It works in the whole application.

But: It's Tomcat 4.1.18 integrated in JBoss 3.0.6 and we do authentication using JAAS and I found no possibility to set the request encoding of the JAAS request (to j_security_check). This resulted in "wrong username or password" for "müller", which could be fixed in the login module by recoding the string. But we also have a "logged in as" on every page and there was not written "müller", but the infamous UTF-8 vs. ISO-8859 "mA¼ller", because it was wrongly set on the request object or at least wrongly read from there.

I have fixed it by writing a SetCharacterEncodingValve and now also the JAAS request is handled as UTF-8, but the application depends on Tomcat now. Does anybody know how to configure the filter mapping to match also the JAAS request? As far as I know the JAAS request is "catched" by the servlet container and does not arrive at the web app. This means the filter mapping in the web.xml can't be read/used.

I would like to replace the Valve with the Filter to avoid servlet container dependency. I appreciate any help.

Regards,

Joerg



-- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to