How can I internationalize my JSP's without taking a huge performance hit? Java Localization imposes a performance hit on my application. Is it better to develop separate versions of the localized JSP pages instead?
swarraj kulkarni If we creates JSP pages beforehand specifically for particular locales, we can certainly expect better performance. But then again, the greatest advantage of moving the static messages into external resource bundles is due to flexibility. You can then add support for different languages easily by simply creating the resource bundle for the new locale and have your JSP page check the HTTP_ACCEPT_LANGUAGE HTTP header to read the appropriate bundle to generate the dynamic content. You can also place the locale-specific information within the session, as demonstrated in Govind Seshadri's article Internationalize JSP-based Websites. Yes, you will take a small performance hit for this, but the gain in flexibility and extensibility of the application more than compensates for this.