My Solution:
I am a chinese and I am writing a website for chinese. every page in my web
site is of utf-8. I use form-based authentication and
org.jboss.security.auth.spi.DatabaseServerLoginModule to authenticate my users.
When some of my users create their accounts with chinese characters in their
login id, they can't login because DatabaseServerLoginModule can't get the
correctly-encoded username. So I debug into jboss authentication module. I
tried to filter all request to use UTF-8 ,but I failed because authectiation
request can't be filtered by the filters defined in /WEB-INF/web.xml. I find
that the DatabaseServerLoginModule can't get the encoded username corretly only
because the username can't be correctly fechted from request by
org.apache.catalina.authenticator.FormAuthenticator. So I need to configure
org.apache.catalina.authenticator.FormAuthenticator in order to get utf-8
encoded username.
i find the configuration here:
http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html
I add a context.xml to /WEB-INF/ and deploy to my jboss server. Now the
username can be fetched correctly now and my users can use chinese characters
in their login id;
my context.xml:
my jboss is 4.20.GA
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054811#4054811
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054811
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user