Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Language/locale from Accept-Language header

 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the header: Accept-Language: da, en-gb;q=0.8, en;q=0.7
and message files for en_US and es_US, what locale will struts automagically set for the user?
 
Rick DeBay
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given the rules for ResourceBundles, the resource used should be SomeResource_en. I would hope that the Locale set would be en_GB, and not da or the default.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic