Externalizing strings

Some of the strings we use in client methods contain important information, such as the PROVIDER_URL, the INITIAL_CONTEXT_FACTORY, the URL of the results page, and the JNDI name of the customer bean. You may want to keep other strings outside of the client code for internationalization, so that you can have the same client in multiple languages.

These strings would rather be placed into a properties file, making it easier for a developer to maintain the code. This is easily done in Application Developer.

Search for strings to externalize

Let us look at one example, the BankingServlet (in ItsoBank5Web). Open the BankingServlet source code and select Source -> Externalize Strings. The Externalize Strings wizard opens (

Get EJB 2.0 Development with WebSphere Studio Application Developer now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.