Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locale in session

Status
Not open for further replies.

samit700

Programmer
Sep 23, 2003
52
0
0
US
Hi,

I have a very basic question on Struts. I was wondering why is a locale always stored in the session context. All the Struts custom tags and configs, message tags depend on the locale being stored in the session scope. Why am I compelled to create a new session for every new user coming to the site. Is there an alternative and why is this implemented this way ?
Thanks,
Samit
 
I always access my locale out of the request object

request.getLocale()

I never see it in my session really, can you point me to a doc that describes the interaction your seeing?

 
Hi,

Thanks for your reply. For example, <bean:message key ="..."> looks for the locale in session. And another example can be <html:html locale=true> creates a new session (if it doesn't already exist) and stores user's locale in it.

Samit
 
Hmm, I don't see that. I use html:html locale=true and when I dump my session keys I do not get any results.

I am probably missing something, I have only been using stuts for about 4 months now. I'll be interested in seeing the result!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top