12.4 Exception Handling and Internationalization

Exception handling was covered in detail in Chapter 10, and as you saw, there are I18N issues that need to be considered when building an exception-handling framework for your application.

Unless you plan to localize the exception messages that are thrown, you need to isolate the exception messages and be sure that they are never shown to the end user. The one thing that is more frustrating for an end user than getting an exception message or stack trace printed out on the screen is getting one that is not in that user's native language.

As Chapter 10 pointed out, exceptions should be caught and localized messages should be displayed to the user. This can be accomplished by using the Struts message resource bundle and the ActionError class. You should never display a Java exception to the end user. Even when there's a system failure that can't be recovered from, you should still have a system error page that is localized for the user.

Programming Jakarta Struts
Programming Jakarta Struts, 2nd Edition
ISBN: 0596006519
EAN: 2147483647
Year: 2003
Pages: 180

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net