• 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

how to set the locale for display tag

 
Ranch Hand
Posts: 258
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,

In my jsp page, I am setting the locale from the database. It is working fine with other struts 2.0 tags and getting the locale specific message properties file. But display tag is not getting the property value for "titlekey".
Please tell me how to set the locale for display tag manually so that it will use displaytag.properties file according to the locale I have set for.

Now it is taking the browsers locale not the locale that I have set

Please help me as soon as possible
 
vijay jamadade
Ranch Hand
Posts: 258
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey friends,

Finally I have found the solution. I downloaded the source file for i18jstladapter.java from the display tag library source download. The display tag properties file related configurations are specified in this file so it was taking by default the locale from the request. So I changed that methos to set the locale and added that file to my project. I also edited the path for that file in all my displaytag.properties file so that settings for my project will be taken from the file that i have configured.

There is one more way you can use


Thats what it was the thing remains is creating your own locale specific displaytga.properties file and add in your classpath
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic