Thanks but it still seems open.. We do give the user the ability to choose
language.
If you really wanted to do this the easiest way would be to forward to an
Action in your secured area (to initiate FORM based auth), say
domain.com/secure/main.do and have the action get their locale from
persistent store and set it before forwarding onto the
domain.com/secure/main.jsp.
This is kind of what I was asking...
This can't be uncommon for struts users (as most are probably working in a
J2EE environment and using container managed security 'j_security_check').
I want to store the user object in the session. Included in that object is
the locale.
Problem is, using container managed security it will forward to the page
they requested and it will not have the locale set by the user on last log
in.
Help!
Mike
- Original Message -
From: Jon.Ridgway [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, September 06, 2002 11:06 AM
Subject: RE: How to set locale using j_security_check
Hi Mike,
By default the user's locale will be set to that specified by their
browser.
If you want to give users the option of changing their locale you would
have
to display supported locales on a form (drop down, graphics etc) let the
user pick a locale and post to an action then as you have already spotted
use the setLocale method on the Action class to set the users locale to
that
specified.
There may be a way - using LDAP and/or RDBMS and/or custom realms in WLS
to
set the locale to a value specified in the realm for the user; not sure
off
the top of my head - never seen one - but I'll have a look into it for
you...
If you really wanted to do this the easiest way would be to forward to an
Action in your secured area (to initiate FORM based auth), say
domain.com/secure/main.do and have the action get their locale from
persistent store and set it before forwarding onto the
domain.com/secure/main.jsp.
Jon Ridgway
-Original Message-
From: Michael Lee [mailto:[EMAIL PROTECTED]]
Sent: 06 September 2002 14:56
To: Struts Users Mailing List
Subject: How to set locale using j_security_check
I use container managed security in WLS using j_security_check. I have
multiple languages. I want to load a user object with a locale and set it
for that user as long as he is logged in (Action.setLocale(request,
locale)??).
How would I do this if the container is handling log in for me? For
example
lets say I want to go to
domain.com/main.jsp but first it sends me to domain.com/login.html. The
container would then authenticate and send me to main.jsp. I want to
intercept this return and log in the user and set the local so he can see
his language ApplicationResources.properties.
Any hints? (I know this group has em! This is the best damn email group in
the world, I swear)
thanks,
Mike
The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence.
Your
co-operation in this matter is greatly appreciated.
--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]