In the following code, the NavigationUtil method uses the portlet's classloader to obtain the portlet's resource bundle. Using this bundle and the locale of the current user, it creates a new JSTL localization context. The localization context is made available to the portlet's JSP page with request scope.


      super.service(request, response, context); 
      
      NavigationUtil.prepareLocalizedResources(
         "sample.welcome.res.Resources", request, context);
      
      // This comes from the portlet.xml.
      String url = (String) context.getAttribute("display-page"); 
      return url;
   } 

   private static final long serialVersionUID = 1L;
}