as UTF-8. (Yahoo web space) Check with the vendor’s documentation, as

as UTF-8. Check with the vendor’s documentation, as each one will be configured differently. You can also set up a servlet filter to do this, but this requires a container that supports the 2.3 Servlet API. Next, the contentType property within the controller element in the Struts configuration file needs to be set correctly. Set it to text/html;charset=UTF-8for HTML Unicode support. You can also specify this in the JSP pages by putting the following line at the top of each page: <%@ page contentType="text/html; charset=utf-8" %> and this line in the HTML head section: Another option is to set the content type and encoding scheme in the response object, like this: response.setContentType(”text/html; charset=UTF-8″); However, you might have to do this in several different places, making maintenance and customization more difficult. You may also have to tell the browser to always send URLs as UTF-8. There’s usually a checkbox or option to do this in IE 5.5, it’s in the advanced options section. There are two final steps to ensure that your application can fully support Unicode. The first is to make sure your database is configured for Unicode. This is usually the default, but you should verify that this is the case. Second, if you’re using the JRE rather than the SDK, use the I18N version and not the U.S. version. 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. Chapter 13. Struts and Enterprise JavaBeans
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Leave a Reply