Using Kookies in JBoss-4.0.0RC2
From a form-login-page I want to pass additional information other than the j_username, and j_password. For this I have a drop-down list on my form-login-page from which the user can select an appropriate value. Before the submit to the /j_security_check action, I call a javascript function which sets the document Kookie with user selected value. Sample code is as below
function setKookie() {
var locale_key = "localeKey";
//build the Kookies
var path = "/";
var localeKookie = locale_key + "=" + escape(document.loginForm.localeKey.value) + ((path) ? "; path=" + path : "");
//Set the Kookies
document.Kookie = localeKookie;
return true;
}
After the /j_security_check action (I am using JAAS authentication for login) a
struts action class is called, where I try to retrieve this set Kookie from the request object. I am using this locale information derived from the Kookie in my application.
Now the problem which I encounter is I am not getting the expected Kookie from the request. But occassionally I am able to retrieve it. When it happens so then I am able to navigate to my application with out problems. Other wise it gives me problem. The
Jboss version I am using is 4.0.0RC2
Is this way of passing additional information appropriate in JBoss? If not what is the way to send additional information from the form-login-page?