Modifying global style elements
Java Components’s configuration determines many of its essential methods. Configuring your web application customizes how it operates internally, and affects the user’s experience. Perform cosmetic customization tasks using the Java Components skins and style sheets, as described in Modifying global style elements.
Set configuration parameters for the Java Components application to tune performance and to control service and application execution. For example, you can perform the following tasks using configuration parameters:
*Setting the default locale
*Modifying global style elements
Configure the Java Components application by changing configuration file contents, such as web.xml. The following section describes the customization procedure using the text editor.
How to customize Java Components configuration parameters
Use the following procedure to customize configuration parameters for Java Components. In this procedure, it is assumed that <context root>\WEB‑INF\web.xml is the configuration file.
1 Make a backup copy of web.xml.
2 Using a text editor that supports UTF‑8 encoding, edit web.xml to change parameter values. Parameter definitions use the following format:
<param-name><keyword></param-name>
<param-value><value></param-value>
*<keyword> is the name of the parameter.
*<value> is the parameter value.
Do not enclose the keyword and value within quotes, and use no spaces between <param-name>, the keyword or value, and </param-name>. For example, the definition for the default locale parameter is:
<param-name>DEFAULT_LOCALE</param-name>
<param-value>en_US</param-value>
3 Save web.xml.
4 Restart the application server or servlet engine that runs Java Components and clear your browser cache.
Setting the default locale
The default locale and time zone for Java Components are set when you install it. To change the default settings, you modify the values of the DEFAULT_LOCALE and DEFAULT_TIMEZONE configuration parameters.
How to set a default Java Components locale and time zone
1 Using a UTF-8 compliant code editor, open the web.xml configuration file.
2 Navigate to the lines that define DEFAULT_LOCALE, similar to the following code:
<param-name>DEFAULT_LOCALE</param-name>
<param-value>en_US</param-value>
Change the current locale id, en_US in the above example, to the desired locale id in param-value. Valid locale id strings are listed in <context root>\WEB‑INF\localemap.xml.
3 Navigate to the lines that define DEFAULT_TIMEZONE, similar to the following code:
<param-name>DEFAULT_TIMEZONE</param-name>
<param-value>America/Los_Angeles</param-value>
Change the current time zone id, Pacific Standard Time in the above example, to the desired default time-zone in param-value. Valid time zone id strings are listed in <context root>\WEB-INF\TimeZones.xml.
4 Save web.xml.
5 Restart the application server or servlet engine that runs Java Components and clear your browser cache.
6 Open the Java Components web application. The login page for the custom application appears.