Sun Microsystems Documentation
Table of Contents

Localizing the Sun OpenSSO Enterprise 8.0 Login Page

This article provides instructions for customizing the OpenSSO login page for your language. You can add a new language and customize the existing non-English OpenSSO Enterprise Login page to contain your localized messages. In the example used in this article, OpenSSO Enterprise is already deployed on a supported web server or application server. See Web Containers Supported For OpenSSO Enterprise 8.0 in Sun OpenSSO Enterprise 8.0 Release Notes for information about supported containers.

Before You Begin

You can customize the OpenSSO 8.0 login page by modifying files in the web or J2EE container where OpenSSO Enterprise is deployed. You can modify the look of the login page, and also customize text messages that are displayed on the login page. This document provides instructions for customizing the login page under the following conditions:

This article does not describe customization from functional point of view. The focus of this article is localizing the login page and adding a new language to the login page.

Best Practices

When modifying files, follow these guidelines to achieve the best results:

For comments or queries regarding this document, send email to the Globalization Team at

Customizing the Login Page

Files to Modify

In this example, two files are modified:

These must be modified under the opensso_app_deploy_dir/config/auth/ directory.

If you are using an authentication module other than the datastore authentication module, then you must modify the corresponding xml file. For example, if you are using the LDAP authentication module, then you must modify the LDAP.xml file. If you are using the membership authentication module, then you must modify the Membership.xml, and so forth.

The Login.jsp and *.xml files must be modified in the appropriate language directories in the OpenSSO Enterprise file structure.

To Customize the Login Page Using GlassFish V2

The following example demonstrates how to customize a localized OpenSSO Enterprise login page for the realm named myorgwith the suffix opensso(which is the default installation), and using the Datastore authentication module. These steps are performed on the Solaris Operating System for the Japanese locale.

  1. After successfully installing and configuring the OpenSSO Enterprise application on a GlassFish V2 container, go to config/auth directory:
    # cd /opt/SUNWappserver/domains/domain1/applications/j2ee-modules/opensso/config/auth/

    Where opensso is the application name of your OpenSSO Enterprise deployment.

  2. Create the following directory structure to store the Japanese-customized login files for the myorg realm :
    # mkdir -p opensso/services/myorg/html
    # mkdir -p opensso_ja/services/myorg/html
  3. Copy all required files from default_ja to the directory created in step 2:
    # cp -r default/* opensso/services/myorg/html
    # cp -r default_ja/* opensso_ja/services/myorg/html

    In Step 2 and Step 3, you must create and copy different locale directories for the realm myorg to be available in different locales. Otherwise the login page will display English for myorg realm. Examples:

    # mkdir -p opensso_de/services/myorg/html 
    # cp -r default_de/* opensso_de/services/myorg/html
    # mkdir -p opensso_fr/services/myorg/html 
    # cp -r default_fr/* opensso_fr/services/myorg/html
    # mkdir -p opensso_es/services/myorg/html 
    # cp -r default_es/* opensso_es/services/myorg/html
    # mkdir -p opensso_en/services/myorg/html 
    # cp -r default_en/* opensso_en/services/myorg/html
    # mkdir -p opensso_ko/services/myorg/html 
    # cp -r default_ko/* opensso_ko/services/myorg/html
    # mkdir -p opensso_zh/services/myorg/html 
    # cp -r default_zh/* opensso_zh/services/myorg/html
    # mkdir -p opensso_zh_CN/services/myorg/html 
    # cp -r default_zh_CN/* opensso_zh_CN/services/myorg/html
    # mkdir -p opensso_zh_TW/services/myorg/html 
    # cp -r default_zh_TW/* opensso_zh_TW/services/myorg/html
  4. Edit Login.jsp.
    # cd opensso/services/myorg/html
    # vi Login.jsp

    Example: Modify the HTML content to include your Organization Welcome message.

    Important: Modify Login.jsp carefully with no errors and without breaking tags!

    # cd opensso/services/myorg/html
    # vi Login.jsp
  5. Edit DataStore.xml to customize messages :
    # cd -
    # cd opensso_ja/services/myorg/html
    # vi DataStore.xml

    Complete the following steps:

    1. Modify the header parameter of the <Callbacks> tag

      Change the Japanese message "This server uses Data Store Authentication" to the new Japanese text in UTF-8 encoding.

    2. Modify the value of the <prompt> element under the <NameCallback> node.

      Change the Japanese label "User Name:" to the new Japanese text in UTF-8 encoding.

    3. Modify the value of the <prompt> element under the <PasswordCallback > node.

      Change the Japanese label "Password:" to the new Japanese text in UTF-8 encoding.

Example 1 Sample Datastore.xml excerpt with Customized Japanese Text
<ModuleProperties moduleName="DataStore" version="1.0" >
    <Callbacks length="2" order="1" timeout="120" 
            <Prompt> YOUR CUSTOMIZED JAPANESE CONTENT  </Prompt>
        <PasswordCallback echoPassword="false" >
            <Prompt> YOUR CUSTOMIZED JAPANESE CONTENT </Prompt>

To Verify the Your Modifications

  1. Be sure that the realm myorg exists in OpenSSO Enterprise.
  2. After modifying the files in the example, restart the GlassFish domain:
    # cd /opt/SUNWappserver9/bin
    # ./asadmin stop-domain domain1
    # ./asadmin start-domain --user admin --passwordfile /root/gfadminpwd.txt domain1 
  3. On the browser, set the Preferred Language to Japanese(ja).
  4. Access the OpenSSO Enterprise login page of your realm. For example, go to the URL:


    You should see the new customized OpenSSO Enterprise Japanese login page containing your new messages and design.

To Add a New Language

You can add a new language other than seven non-English languages that come with OpenSSO by default. This way the OpenSSO login page will be available in a new language of your choice. In the following example, the OpenSSO Login page is made available in the Hindi language.

  1. Create a directory named opensso_hi and copy required files.

    This directory is for adding the Hindi language. Example:

    # mkdir -p opensso_hi/services/myorg/html 
    # cp -r default_de/* opensso_hi/services/myorg/html
  2. Edit the localized contents in the opensso_hi directory.

    In this example, Japanese messages are replaced with Hindi text.

  3. To add a new language of you choice, create a directory name suffixed with Locale ID in the following format:


ContactAbout SunNewsEmploymentSite MapPrivacyTerms of UseTrademarksCopyright Sun Microsystems, Inc.