As with (Sri lanka web server) regular Java resource bundles, you should

As with regular Java resource bundles, you should always provide a base definition that is used when no locale is provided or when an unsupported locale is used. No language or country suffix is appended to the name of the Tiles base definition file. Once you have created the locale-specific definition files and placed them in the WEB-INF directory, the only other necessary step is to ensure that a Locale is stored in the user’s HttpSession. The Tiles framework depends on the same Locale instance that Struts uses to determine which definition file to use. You will need to ensure that the Struts framework is storing the user’s Locale in the session. This is accomplished by setting the locale attribute to true in the controller element. See Section 4.7.2 for more information on the controller element. That’s all there is to it. Note that you should still rely on the Struts resource bundle for locale-sensitive resources such as text, messages, and images. The I18N support in Tiles should be used for differences in layout based on the locale. Struts and Tiles work very well together to provide complete I18N support. Chapter 15. Logging in a Struts Application As dedicated and knowledgeable Java programmers, we always want to believe that the software we create will stand up to the utmost scrutiny. However, as human beings, we’ll all fallible, so it’s never a good practice to believe that our software contains no defects. The important thing is to use every means available to try to eliminate the defects, or at least reduce them to an acceptable amount. Generating log messages that tell you what the application is doing can help you locate any defects that are present in your software. However, logging is important for other reasons as well. For example, security and auditing might depend on logging to provide information to the system administrators about what the authorized and, more importantly, unauthorized users of the application are doing. By providing real-time information about potential security attacks on the application, logging can give a much-needed edge to the system administrators and allow for quicker reactions to attacks. This chapter takes a close look at how the use of logging in your Struts application can help you identify defects before the application gets into production, or, if your software is already being used in production, how logging can help you to quickly identify problems with the software and arrive at solutions. 15.1 Logging in a Web Application The importance of logging has been evident to experienced developers for many years. Arguably, logging can be as important a part of your framework as exception handling or even security, both of which may rely on logging functionality to help carry out their responsibilities. Without logging in an application, maintenance can become a nightmare for the developers. We all know that all “real” applications periodically go through maintenance cycles. Still, you may wonder whether logging in web applications is as necessary and important as logging in other types of applications. Because web applications can sometimes be smaller and less complex than their enterprise counterparts, you might think that logging is less important in these applications.
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply