Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set the locale for display tag

 
vijay jamadade
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • 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: 243
1
  • Mark post as helpful
  • send pies
  • 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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic