Sun Java logo     Previous      Contents      Index      Next     

Sun logo
Sun Java System Portal Server 6 2005Q1 Technical Reference Guide 

Chapter 75
Overview

This chapter contains the following sections:


Introduction

To generate the rendered Desktop user interface (what the industry refers to as the “presentation”), the Sun Java System Portal Server software makes use of either JavaServer Pages (JSP™) or template files.


Installation Location

The default set of template files are installed in /etc/opt/SUNWps/desktop/default directory. The sample portal template files are installed in /etc/opt/SUNWps/desktop/sampleportal and /etc/opt/SUNWps/desktop/anonymous directories. Files in the /etc/opt/SUNWps/desktop/anonymous directory are specific to the sample portal Anonymous Desktop.


The Desktop and Template Files

Providers that use template files hardcode their names and the template file names are not configurable in the Display Profile. For Providers that are based on JSP provider, the names of the JSP used by provider can be administratively changed as it is a property of the channel.

Both JSP and Desktop templates serve the purpose of separating business and presentation logic in the Portal Server. JSP is an accepted standard and is widely employed in many web-based applications. Desktop templates pre-date the emergence of JSP. JSP has many advantages over Desktop templates.

It is highly recommended that new Portal Server providers be based on JSP and the Portal Server JSPProvider. However, there may be cases where the simplicity of Desktop templates provides an advantage. Desktop templates are fully supported in Portal Server. Many pieces of the product, such as the communications channels, continue to use them.


File Lookup Scenario

The Portal Server software uses the lookup scenario outlined in Code Example 75-1 and Code Example 75-2 to find the JSPs it needs. Use this order to decide the final location of your own JSPs.

Code Example 75-1  Template File Lookup Scenario  

desktoptype_locale/channelname/clientPath

desktoptype_locale/provider/clientPath

desktoptype_locale/channelname

desktoptype_locale/provider

desktoptype_locale/clientPath

desktoptype_locale

desktoptype/channelname/clientPath

desktoptype/provider/clientPath

desktoptype/channelname

desktoptype/provider

desktoptype/clientPath

desktoptype

default_locale/channelname/clientPath

default_locale/provider/clientPath

default_locale/channelname

default_locale/provider

default_locale/clientPath

default_locale

default/channelname/clientPath

default/provider/clientPath

default/channelname

default/provider

default/clientPath

default

templateroot

If there is no clientPath specified, then the directory search order is as follows:

Code Example 75-2  Template File Lookup Scenario  

desktoptype_locale/channelname

desktoptype_locale/provider

desktoptype_locale

desktoptype/channelname

desktoptype/provider

desktoptype

default_locale/channelname

default_locale/provider

default_locale

default/channelname

default/provider

default

templateroot

The lookup scenario relies on the following parameters:

desktoptype

For example default (set in the administration console). Note that desktop type is now a comma separated string list and so the look up will be based on the desktop type(s) that are defined in the desktoptype attribute.

locale

Preferred locale is the user’s locale. For example, en_US (set by users through the administration console in the “User” setting)

clientPath

This is an optional file-path containing client-specific templates; for example, html (set through the administration console Client Detection service)

channelname

This is the name of the channel; for example, newSingleContainer (set in the display profile)

provider

This is the provider name; for example, JSPSingleContainerProvider (set in the display profile)

templateroot

This is defined in the desktopconfig.properties file. The root of the search directory (default value of /etc/opt/SUNWps/desktop/) can be changed by modifying the templateBaseDir property in the desktopconfig.properties file.



Previous      Contents      Index      Next     


Part No: 817-7696.   Copyright 2005 Sun Microsystems, Inc. All rights reserved.