Re: [enhydra] Question: Password save in Browser cookies?
"Slobodan Vujasinovic" <[email protected]> Fri, 10 Jun 2005 14:51:57 +0200
| Newsgroups | gmane.comp.java.enhydra.general |
|---|---|
| Message-ID | <004a01c56dbb$30159580$2300a8c0@ns1> |
Hi,
in EAF we are creating application (session) cookie (which stores
'JSESSIONID' value) with its default behavior (the cookie is not stored
persistently, and will be deleted when the user agent (web browser) exits).
Currently we don't have additional 'SessionManager' implementation that
would support cookie persistence (that would mean to keep session alive for
"long" period of time).
I think that this is something that should be done from application code!
We don't have sample implementation included in "Enhydra Demos" but it
should be rather ease to implement this!
For example:
When user chooses to 'save user login data' you can do something like this
e.g. redirect to same PO with "action" parameter set to 'setCookie' value
----------------------------------------------------------------------------
--------------
...
if (action.equals("setCookie")) {
Cookie cookie = new Cookie ("LoginAttributeName",loginAttribute);
cookie.setMaxAge(1000000);
comms.response.addCookie(cookie);
}
...
comms.response.writeDOM(yourHTMLresponse);
----------------------------------------------------------------------------
--------------
and in 'Login' PO initialization (or before redirection to 'Login' PO) you
can do something like this to initialize user login attributes
----------------------------------------------------------------------------
--------------
...
Cookie [] cookies = comms.request.getCookies();
for (int i=0; i<cookies.length; i++) {
if ("LoginAttribute".equals(cookies[i].getName())) {
loginAttribute = cookies[i].getValue();
}
}
...
----------------------------------------------------------------------------
--------------
Hope this helps!
Regards,
Slobodan Vujasinovic
Enhydra Development Team
----- Original Message -----
From: "Lofi Dewanto" <[email protected]>
To: "enhydra" <[email protected]>
Sent: Friday, June 10, 2005 7:58 AM
Subject: [enhydra] Question: Password save in Browser cookies?
> Hi Community,
>
> can you point me to an Enhydra example, where I can see
> how to save your "login" in the web browser cookies to
> make it persistent? So that the login will survive
> after closing the browser?
>
> Is there any implemented EAF SessionManager for this purpose?
>
> I want to add "save your login" function in OpenUSS, so that users
> using private PC do not always have to login everytime he/she wants
> to go inside OpenUSS after closing the browser...
>
> Any hints are very welcome!
>
> Thanks a lot!
> --
> ---------------------------------------------------
> Blasius Lofi Dewanto
> ---------------------------------------------------
> OpenUSS - Open University Support System
> http://openuss.sourceforge.net
> ---------------------------------------------------
> E-Mail : [email protected]
> ---------------------------------------------------
>
>
>
----------------------------------------------------------------------------
----
>
> --
> You receive this message as a subscriber of the [email protected]
mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
message.footer
(text/plain, 275 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws