Skip to Content

<H3>Introduction</H3>

The Logon par comes with a bundled property file logonLabels_<locale>.properties contained in the “umelogonbase.jar”, where the <locale> represents the current locale[en,de etc].Using this property file we can change the content to be displayed on the logon page based on the user locale.

<H3>Assumption</H3>

Reader knows the basic customization rules of the standard logon PAR.

<P>

Here we go,

<H5>Step-1</H5>

Define the content as keys, in a separate property file, you can name it as : “content.properties”. You can choose to use the basic HTML tags.The content may look like :

<P>

<TEXTAREA cols=60 rows=10>

FTEXT1=<p>Logon
Enter your personal logon ID in the “User ID” and “Password” fields and click “Submit”.

FTEXT2=

Forgot your password?
No problem! Simply click ….”

Save this property file any where in the file system where your portal server installed, for ex:

D:
commoncontent
en
content.properties

For other language you can choose different folder structure like:

D:
commoncontent
de
content.properties

Step-2

Extract the umelogonbase.jar to a temp location and modify the property file as below.
Make an entry in the logonLabels_en.properties file as

CONTENT_PATH=D:
content
en
content.propertiesCONTENT_PATH=D:
content
fr
content.properties

     public static  ReadContent getInstance()

     {

          if ( readlogon == null )

          {

               readlogon      = new ReadLogonContent() ;

               return readlogon ;

          }

          else

          {

               return readlogon ;

          }

     }

     public static String[] getContent(String tagName,String labelValue) throws Exception

     {

          

          /**

          

  • Note that the parameter tagName is not used here. I have removed the use of that parameter

          

  • to make this code look simple. The parameter labelValue will nów carry the path of the content

          

  • defined in the property file.

          */

          Properties properties     = loadProperties(labelValue) ;

          String strArrContKey[]     = new String[3] ;

          try

          {

/**

  • Change the “key1”.. below to FTEXT1 or what ever the key

*that you define.

*/

               strArrContKey[0]     = properties.getProperty(“key1”) ;

               strArrContKey[1]     = properties.getProperty(“key2”) ;

               strArrContKey[2]     = properties.getProperty(“key3”) ;

          }

          catch(Exception e)

          {

               System.err.println(” Error :: readlogoncontent>>getContent() while reading keys:>>” + e.getMessage() ) ;

          }

          finally

          {

               properties.clear() ;

               properties     = null ;

          }

          return strArrContKey ;

     }

Step-4

Do deploy the new logon par file to the server and check for the content display.

Conclusion

Since the umLogonBotArea.txt is included in all the JSP’s, the content is now displayed in all the pages.

Now any switch between the locale will make the content changed as defined in the content file specific to a Locale.

Since the locale switch is handled by standard SAP code we have to only add the relevant property and path information in order to pick the correct locale content file. You can use this even to display the name of a company in different locale.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply