I have below dropdown value in html and I am sending data to servlet using get method
<select name="country">
<option value="IN">India</option>
<option value="AU">Australia</option>
<option value="US">United States</option>
</select>
request.getParameter("country");
Use
<select name="country">
<option>India</option>
<option>Australia</option>
<option>United States</option>
</select>
Instead.
Or use the direct BCP47-Code (https://tools.ietf.org/html/bcp47)
Locale.forLanguageTag(request.getParameter("country"))
.getDisplayCountry(Locale.forLanguageTag("en_US"));
Page 4 sais 2 ALPHA-Characters are minimum for locale:
language = 2*3ALPHA ; shortest ISO 639 code