• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Pass parameter on URL to struts app?

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you try setting a session attribute? You can then pass it along in the request.
 
A Harry
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ah what a numpty - use getParameter() instead of getAttribute() & it works!
reply
    Bookmark Topic Watch Topic
  • New Topic