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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.