title: How to set custom locale in java ee?
body: <p>I have an application that needs to set locale based on some url parameter.</p>
  
  <p>I tried to set the <code>ResourceBundle</code> like this:</p>
  
  <pre><code>   Locale italian = new Locale("it", "IT");
     ResourceBundle bundle =
              PropertyResourceBundle.getBundle("com.i18n.nl.MyResource",
                      italian);
      sessionBean.setBundle(bundle);
  
      request.getSession().setAttribute(Constants.SESSION_BEAN, sessionBean);
  </code></pre>
  
  <p>But, as my browser is English, it shows the English locale instead of the italian bundle resources. </p>
  
  <p>Should I do anything else in my <code>.jsp</code> file?</p>