Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Pass

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My app will be installed on the company's intranet. It is designed to work in both english & welsh languages using resource bundles.
The problem is that only some of the intranet's areas are be in welsh so the browser is set to english - so the locale stuff won't work.
Links to my app will be put on the intranet, one each for english & welsh versions. What I need to do is pass a flag from these links to my app to indicate which language to use. I can't seem to pass the flag in!
Tried something like this "http://localhost:9001/ABC.do?lang=cy"; hoping the lang attribute would be readable from the request object in the corresponding action class - but it's not - it's null!!!
How can I/is it possible to do this? - any ideas?
thanks
harry
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The lang attribute will be available as a paramter in the request not at an atribute, it is a request paramater not an object in the request object,
use
String lang = request.getParameter("lang");
that should give you the parameter
then you can set your locale.
 
Sheriff
Posts: 15815
264
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy "harryajh",
I'm gonna have to ask you to
change your publicly displayed name in your profile so it goes along with our Naming Policy. See'in as Sheriff Cindy asked you to do this a while back, I'd be much obliged if you won't mind takin' a minute to make sure it gets done here soon.
- yer friendly neighborhood bartender
 
Hey! You're stepping on my hand! Help me tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic