Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JAAS login module - does SAP's HttpCallbackHandlerImpl support UTF-8?

hello all,

i am running netweaver 2004 sp14 j2ee engine on windows 2003 using oracle db. i have a servlet-based web application that has its own user authentication scheme and uses a form-based login screen. i create a jaas login module, add it to the ume user store and configure it for my web app. mostly it works fine.

now i am facing a problem when the user id contains non-ascii characters, such as "Tomcôté_ça1". i am very sure it is a valid user in my web app and the same user id works fine on Weblogic. when i add this user to j2ee UME via Visual Admin tool and the Administrator group, i can login with this id to the UserAdmin web page too (http://host:50000/useradmin). so the user id itself is ok and from browser to j2ee engine there is no data corruption. i've set up my IE browser to always send URLs in UTF-8.

i debugged in my login module code and found something interesting. by the time my code gets the user id from the callback handler, the id is already corrupted, all the French characters are garbage now. so i looked at some of the sap data structures in the Eclipse debugger.

in my login module, when method, public void initialize(Subject subject, CallbackHandler callbackHandler, Map sharedState, Map options), is first invoked, the CallbackHandler passed in is of type: "".

this object has one data member named "clientInfo" of type "". and this object has a data member named "characterEncoding", whose value is "ISO-8859-1".

i think the encoding NOT being UTF-8 is the cause of my problem. the question is, is there any way for me to set it to UTF-8? perhaps not in the login module code, because it would have been too late by then since the user id and password were already read and parsed from the http request.

so it sounds like somewhere in the j2ee engine configuration, i should be able to set character encoding to always be UTF-8? but where? i've done certain amount of searching in the service marketplace (oss notes), sap online help site and this SDN site. so far, no useful information.

if you have run into similar problems and have ideas as to where to find more information on the subject, would you pls kindly drop me a line or two? or for the SAP folks, if you think this may be a bug of the j2ee engine, pls let me know too.

thanks you very much.


Former Member
Not what you were looking for? View more on this topic or Ask a question