users@glassfish.java.net

Re: Locale Problem of j_security_check

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 20 Jan 2010 11:23:25 -0800

On 01/14/10 06:08 PM, Jan Luehe wrote:
> On 01/13/10 12:39 PM, glassfish_at_javadesktop.org wrote:
>> Hello,
>> I am using form based authentication against an ldap realm. Login
>> operations fail with users that have Turkish characters in their user
>> names.
>>
>> AS Version: GlassFish v2.1 (9.1.1) build b60e-fcs
>>
>
> Unless the submission of your application's login form specifies any
> parameter
> encoding, the container won't be able to properly decode the form's
> username and
> password parameters.
>
> You can specify the encoding of the login form's parameters by using a
> hidden
> form field, as in the following example:
>
> UserName: <INPUT TYPE="text" NAME="j_username" VALUE=""> <BR>
> Password: <INPUT TYPE="password" NAME="j_password" VALUE=""> <BR>
> <input type="hidden" name="encoding" value="XXX">
>
> In this case, the name of the hidden form field is "encoding" (but you
> could use any name), and its value would be the locale for Turkish
> (change XXX as appropriate).
>
> You would also have to instruct the container to look for this hidden
> form field by bundling a sun-web.xml descriptor with the following
> contents
> with your application:
>
> <sun-web-app>
> <locale-charset-info>
> <parameter-encoding form-hint-field="encoding"/>
> </locale-charset-info>
> </sun-web-app>
>
>
> Jan


I've added this topic to the GlassFish FAQ, see

  http://wiki.glassfish.java.net/Wiki.jsp?page=FaqMultibyteFormSubmission
  ("How can I use multibyte data in FORM submissions?")

Hope this helps.

Thanks,

Jan

>
>
>> [Message sent by forum member 'bsevindi' (buraksevindi_at_gmail.com)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=380752
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>>
>
>