Hi Martin, Thanks! I already have the following at the beginning of all the jsp pages. <%@ page contentType="text/html; charset=UTF-8"%>
Martin Gainty <[EMAIL PROTECTED]> wrote: Dave- I believe you can effect this encoding if you specify encoding="UTF-8" in the xml element e.g. I am not aware of CJK implementations that use UTF-8 ..you may want to consider UTF-16 Scott does this look ok? HTH, Martin- ----- Original Message ----- From: "Dave" To: Sent: Thursday, March 02, 2006 12:02 PM Subject: Form login UTF-8 username problem > Web application using JBoss 4.0.3SP1 and servlets. > I am using FORM authentication. Can username be UTF-8? > I create an account, its username is in UTF-8 encoding, chinese characters. > But login was not successful. Can JBoss built-in authentication handle UTF-8 > encoding for username? > > Ascii username works. > > I tried to use a filter to set request encoding to UTF-8, but the filter was > not called for URL pattern "j_security_check". > > > filter > /j_security_check > > > > Right now I am using a filter to set request encoding to UTF-8 for all > requests in order to support chinese characters. It works great except Form > login. The username is created in UTF-8 and stored in database. > > The related part in login-config.xml > > > flag="required"> > > java:/DefaultDS > > select password from User where username=? > > > So I suspect the FORM login need to go through a filter to set its encoding > to UTF-8. Otherwise, the server side would assume iso-8859-1 encoding, and it > would not find the username in database table. Is there a way to tell Web > Container about the request encoding? > > Thanks for help. Have a nice day! > > > --------------------------------- > Yahoo! Mail > Bring photos to life! New PhotoMail makes sharing a breeze. --------------------------------- Yahoo! Mail Bring photos to life! New PhotoMail makes sharing a breeze.