• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Using kookies in JBoss-4.0.0RC2

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know why that wouldn't work. I've had problems in the past with double submitting. could it be related to that?
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic