Sun Java System 2005Q4 Technical Note

Sun Java™ System Technical Note: Getting Started with Enterprise Sample Portal 1.1

Part Number 819-3629-10

The Enterprise Sample Portal is a business portal based on a fictitious company named Adventure Sports Caf�. The Enterprise Sample Portal showcases key features of the Sun Java™ System Portal Server. The Enterprise Sample installer creates a default organization in Directory Server (o=adventuresportscafe.com) and adds three users with different roles to highlight some of these basic features.

This technical note describes how to install and customize the Enterprise Sample Portal using the Sun Java™ System Access Manager administration console and cascading style sheets. This technical note contains the following sections:


Installing the Enterprise Sample Portal

This section describes how to install and access the Enterprise Sample Portal on Portal Server 6.

The Enterprise Sample Portal requires that all Sun Java System products (with the possible exception of the Directory Server) reside on the same machine. The Directory Server can reside either on the same host or on a separate host.

  To Install the Enterprise Sample Portal

  1. Ensure that the, LDAP Directory, Access Manager, and Sun Java System JES2005Q1 or JES2005Q4 Webserver or Sun Java System Application Server, version are started.
  2. Create a custom directory.
  3. For example:

    mkdir my_enterprise_sample

  4. Change directory to your custom directory.
  5. For example:

    cd my_enterprise_sample

  6. Download the Enterprise Sample Portal version 1.1 from:
  7. http://www.sun.com/download/products.xml?id=42b76ac9

    You can also download the Sun Java System Portal Server 6 Enterprise Sample Portal Installation Guide from:

    http://docs.sun.com/source/819-4160/index.html

  8. unzip the enterprise_sample file.
  9. For example:

    unzip enterprise_sample.zip

  10. Run the setup program.
  11. ./setup

  12. Select Install Enterprise Sample when the application offers the following options:
  13. 1) Install Enterprise Sample

    2) Quit

  To Access the Enterprise Sample Portal

  1. The Enterprise Sample Portal page is available at: http://your-server:port/portal/welcome/.
  2. This is the welcome page and introduction to Adventure Sports Caf�.

  3. Follow the links to login -> Download and Install -> Login to the Adventure Sports Caf�. The URL will look something like this:
  4. http://your-server:port/portal/dt?desktop.suid=uid=ascauthlessanonymous,ou=People,o=adventuresportscafe.com,dc=your-dc,dc=your-organization,dc=com&provider=ASCTabContainer

  5. Login as Mary, Chris, or Ed and observe the difference in the portal content based on their roles. The password for these user accounts is "ascsample".

  6. Note

    This may change in later versions. The password may become the same as the user ID.


If you choose to provide a different organization name, select the name in accordance with the Access Manager naming attributes.


Customizing Your Portal

The following procedures, based on the Enterprise Sample Portal, show you how to change the logos and default customizations:

Changing the Logo

  To Change the Logo

  1. Get a suitable image of the logo in the supported format (such as jpeg, gif, png).
  2. Edit the following file: /etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider/body.jsp
  3. Change the image file name asc-logo-8.png to your new image logo file name.
  4. Place your image in your new Enterprise Sample Portal directory under the portal web application source directory.
  5. On Solaris this directory is /opt/SUNWps/web-src/asc/images.

    For example:

    cp my-image.jpg /opt/SUNWps/web-src/asc/images

  6. Redeploy the portal web application for the new Enterprise Sample Portal image so that it is available to the Portal Desktop.
  7. Note: This ensures that the change is not lost if the portal web application is ever redeployed.

    For example:

    /opt/SUNWps/bin/redeploy

    The changes should now be visible.

  8. Go to the site http://your-server:port/portal/welcome/ and verify that the new logo appears as desired.

Changing the Presentation Theme

The Enterprise Sample Portal uses Cascading Style Sheets (CSS) for the Portal Desktop presentation. The CSS files are located in the Enterprise Sample Portal CSS directory under the portal web application source directory. On Solaris, this directory is /opt/SUNWps/web-src/css.

After modifying a CSS file, the portal web application must be redeployed for the change to take affect.

The following procedures illustrate some ways you can make changes in the CSS file.

  To Add a Background Image

  1. Go to the Enterprise Sample Portal CSS directory located under the portal web application source directory.
  2. Modify the CSS file in the appropriate places
  3. For example:

  To Change the Background Color

  1. Go to the Enterprise Sample Portal CSS directory located under the portal web application source directory.
  2. Modify the CSS file in the appropriate places.
  3. For example:

  To Modify the Color Gradient Image

  1. Go to the Enterprise Sample Portal CSS directory located under the portal web application source directory.
  2. Modify the CSS file in the appropriate place.
  3. For example:

    Replace the image channel-gradient-orange.gif. with your new color gradient image.

shows the location of JSP and image files for the Enterprise Sample Portal logo and banner.

Table 1  Location of JSP and Image Files


Element

Name/File

Location

ASC Logo

altShortBody-asc-logo.gif; asc-logo-8.png

/etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider/body.jsp; /etc/opt/SUNWps/desktop/asc/body.jsp; /etc/opt/SUNWps/desktop/asc/error/noneditablechannel.template; /etc/opt/SUNWps/desktop/asc/error/noprivilege.template; /etc/opt/SUNWps/desktop/asc/error/unknownchannel.template; /etc/opt/SUNWps/desktop/asc/IdenityServerAuth/login_failed_template.jsp; /etc/opt/SUNWps/desktop/asc/IdenityServerAuth/membership.jsp

ASC Banner

Header-alone-no-logo.jpg

/opt/SUNWps/web-src/asc/images

ASC Title

/etc/opt/SUNWps/desktop/asc/

/etc/opt/SUNWps/desktop/asc/title.jsp

User Info Form

/etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider

/etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider/anonymous.jsp

Banner Background Color

/opt/SUNWps/web-src/css

/opt/SUNWps/web-src/asc/css/*

Other Background and Positions

/opt/SUNWps/web-src/asc/css/*

/opt/SUNWps/web-src/asc/css/*



Presenting Information on the Desktop

When you look at the Portal Desktop, you see a web page with columns and tabs along the top.

Each column contains one or more channels (small windows). A channel contains a page that displays a specific type of information (such as news and search).

You can use the tabs to navigate and separate content by categories. Each top level tab can have multiple nested tabs. The Enterprise Sample Portal uses two tabs: Home and MyPortal. The Home page has the nested tabs News and Career.

For detailed information on the channels and tabs, see the Sun Java System Portal Server Desktop Customization Guide.

Channels

To the end user, a channel is a distinct area in the desktop, usually set off with a border and header row of icons. The icons enable users to configure the channel to their preference.

Channels are administered from the Access Manager administration console. The administration console allows you to create channels from pre-built as well as custom providers and to change channel preferences.

Channels can be implemented either as Providers or Portlets.


Note

A “channel” is a Sun Java System Portal Server specific term. The portlet specification (JSR-168) does not use the term “channel”. Rather, the JSR-168 portlet specification uses the term "portlet window" to refer to a specific use of a portlet.


Providers

Providers are vertical channels that have a single use and can be reused (multiple channels can be created from a single provider) on a custom portal. Providers are Java class files based on the Provider API that can be used to construct both channels and page containers.

You can use the Portal Server pre-built providers such as JSPProvider, URLScraperProvider, and XMLProvider to implement channels without the need to write code.

Portlets

Portlets function similarly to providers, however they are based on the API defined by the JSR-168 portlet specification.

The Sun Java System Portal Server includes the following sample portlets:

Portal developers should use portlets, unless there is a good reason not to. The advantages to using portlets are as follows:

Adding Content to the Desktop

Portal administrators can add content to the Portal Desktop by adding provider and portlet channels. The following procedures discuss how to create a channel, modify it’s properties, add it to the desktop and then verify that it is being displayed.

Suppose you want to create a channel, named MyChannel, that displays content from an external web page (for example, http://www.sun.com). You use the following procedures:

  To Create a Channel

Provider and Portlet channels are created in the same way.

  1. Login to the Access Manager administration console as administrator (amadmin).
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Select Services from the View drop-down menu in the Navigation pane.
  5. Click the properties icon arrow next to Portal Desktop.
  6. Click the Manage Channels and Containers link.
  7. Click New.. under Containersunder the Channels section.
  8. A form displays allowing you to specify the name of your new channel and the provider to use. For example, to display content from an external provider, you select the UrlScraperProvider from the Provider drop-down menu.

  9. Click OK to return to the Portal Desktop administration page.
  10. The newly added channel, MyChannel, now appears under the Channels section of the Portal Desktop administration page.
  11. After creating MyChannel, the channel properties can be modified.

  To Edit the Channel Properties

  1. Click Edit Properties... link next to the MyChannel channel under the Channels section.
  2. A form displays with the current channel properties.

  3. Modify the desired property values.
  4. For example you might want to change the channel title or description.

  5. Click Save.
  6. Now you can add MyChannel to the Desktop.

  To Add a URLScraper Channel to the Desktop

  1. Click NewsContainer under the Containers section.
  2. Select the MyChannel entry in the Ready For Use list under Channel Management.
  3. Click Add to move the MyChannel entry to the Available to End Users on the Content Page list. Ensure that the MyChannel entry in Available to End Users on the Content Page is highlighted.
  4. Click Add under that list to move the entry to Visible on the Portal Desktop list.
  5. Click Save under Channel Management.
  6. Logout of the administration console.

  To Verify That the URLScraper Channel Displays on the Desktop

After you have added the channel to your desktop, verify that it is visible.

  1. Access the Enterprise Sample Portal anonymous portal.
  2. Login as mary with the password “ascsample”.
  3. The user information channel displays in the left column.

Categorizing Content on the Desktop

You can use tabs to categorize the information on your desktop. A tab is a page. Each top level tab can have multiple nested tabs. The Enterprise Sample Portal uses two tabs: Home and MyPortal. The Home page has the nested tabs News and Career.

Every page is either:

Before you can display the information within a channel, a tab and table container must be defined.

Looking at the Adventure Sports Caf� home page, the home page is a tab, the News tab is a nested tab. The tab specifies the type of provider or portlet. The home page displays a table container defined so that is contains three columns: thin, wide, thin.

The following procedures illustrate how to create and display information:

  To Create a New Tab Container

The following steps create a new tab container by the name MyTabContainer and adds it to the list of containers on the Portal Desktop administration page.

  1. Login to the Access Manager administration console as administrator (amadmin).
  2. Navigate to the adventuresportscafe.com organization.
  3. Select Services from the View drop-down menu in the Navigation pane.
  4. Click the properties icon arrow next to Portal desktop.
  5. Click the Manage Channels and Containers link.
  6. Click New.. under Containers.
  7. A form is displayed allowing you to specify the name of your new container and the provider to use.

  8. Enter MyTabContainer next to Channel Name and select JSPTabContainerProvider from the Provider drop-down menu.
  9. Click OK to return to the Portal Desktop administration page.


Note

The current release of the Enterprise Sample Portal contains a bug. Clicking a top-level tab causes an error page to be displayed. To resolve this issue see Fixing the tabLevel property bug.


Suppose you want to change the title of the tab from MyTabContainer to MyTab.

  To Change the Title of a Tab

  1. Click Edit Properties.. next to MyTabContainer.
  2. In the Edit properties form, change the description and title to "My Top Level Tab" and "MyTab" respectively.
  3. Click Save to save the changes and return to the Portal Desktop administration page.

  To Display the Tab on the Desktop

  1. Click ASCTabContainer.
  2. Select the MyTabContainer entry in the Ready For Use list.
  3. Click Add button to move the MyTabContainer entry to the Available to End Users on the Content Page list. Ensure that the MyTabContainer entry in Available to End Users on the Content Page is highlighted.
  4. Click Add button under Content Page list to move the entry to Visible on the Portal Desktop list.
  5. Click Save.
  6. The newly created tab, MyTab, has no content. To add content to this tab, you must add a nested tab to MyTab.

  To Add a Nested Tab to a Tab

Before you can add content to a tab you must create a nested tab. A nested tab is a table container that aggregates channels and is derived from the JSPTableContainerProvider.

  1. Follow the same steps as in To Create a New Tab Container.
  2. Choose JSPTableContainerProvider instead of JSPTabContainerProvider in Step# 7.

  3. Follow the same steps as in To Change the Title of a Tab.
  4. Change the description and title to "Nested Tab" and "NestedTab" respectively.

  To Display a Nested Tab on the Desktop

  1. Click MyTabContainer on the Portal Desktop administration page.
  2. Select the NestedTabContainer entry in the Ready For Use list.
  3. Click Add button to move the NestedTabContainer entry to the Available to End Users on the Content Page list. Ensure that the NestedTabContainer entry in Available to End Users on the Content Page is highlighted.
  4. Click Add button under that list to move the entry to Visible on the Portal Desktop list.
  5. Click Save and return to the Portal Desktop administration page.

  To Add Content (channels) to a Nested Tab

  1. Click NestedContainer on the Portal Desktop administration page.
  2. Select the desired channel to be added to the tab. For example, add Bookmarks and SampleXML channels to the nested tab. Select the Bookmarks entry in the Ready For Use list.
  3. Click Add button to move the Bookmarks entry to the Available to End Users on the Content Page list. Ensure that the Bookmarks entry in Available to End Users on the Content Page is highlighted.
  4. Click Add button under that list to move the entry to Visible on the Portal Desktop list.
  5. Repeat above step for SampleXML channel.
  6. Click Save.

  To Verify Tabs are Displayed on the Desktop

  1. Access the Enterprise Sample Portal anonymous portal.
  2. Login as mary with the password “ascsample”.
  3. The new tab is displayed next to Home and MyPortal.

  4. Click MyTab.
  5. The nested tab NestedTab being the only nested tab in MyTab is displayed with the Bookmarks and SampleXML channels.

Displaying the Desktop Content

You can change the layout of columns by modifying their layout properties. The layout of the columns is determined by a numeric value you assign for each table container. Every channel can be assigned a thickness: thin or wide. All the thin and wide channels are then aggregated by the containers and displayed according to the selected channel layout.

The numeric value for the layout is unique and is used as the value for the layout property of the container. shows the numeric values associated with the number of columns and their widths.

Table 2  Column Layout

Layout

Number of Columns

Numeric value

Thin - Wide

Two

1

Wide - Thin

Two

2

Thin - Wide - Thin

Three

3

The default layout of the NewsContainer is Thin - Wide - Thin. The Enterprise Sample Portal defines column widths as layout=3 (Thin-Wide-Thin). To extend support for more layouts, refer to Adding New Layouts.

  To Change the Width and Number of Columns

  1. Login to the Access Manager administration console as administrator (amadmin).
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Select Services from the View drop-down menu in the Navigation pane.
  5. Click the properties icon arrow next to Portal desktop.
  6. Click the Manage Channels and Containers link.
  7. Click Edit Properties for NewsContainer under the Containers section.
  8. Change the layout property to a new numeric value.
  9. Click Save to save the changes and return to the Portal Desktop administration page.

  To Verify that the Layout Properties Are Changed

  1. Access the Enterprise Sample Portal anonymous portal.
  2. Login as mary with the password “ascsample”.
  3. The new layout for NewsContainer displays..

Setting Up an Anonymous Portal

The Enterprise Sample Portal installs with a functional anonymous portal that allows unauthenticated users access to information in the Portal Desktop before logging in to the Enterprise Sample Portal. This section provides instructions on how to setup a new anonymous Portal for the Enterprise Sample Portal.

To setup an anonymous portal, you need to do the following:

For complete information on configuring anonymous authentication for the Portal Server, refer to the chapter “Administering Authentication, Users, and Services” in the Sun Java System Portal Server 6 2005Q1 Administration Guide.

The organization adventuresportscafe.com referenced below is available after the Enterprise Sample Portal has been installed.

  To Create an Anonymous Portal

  1. Login to the Access Manager administration console as administrator.
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Use the View menu in the navigation pane and select Users.
  5. Create a user account, for example create the user account siroeauthless.
  6. The Enterprise Sample Portal creates the user ascauthlessanonymous.

  To Configure the Portal Desktop for the Anonymous Portal

The administrator needs to configure the Portal Desktop for anonymous Portal Server access.

  1. Login to the Access Manager administration console as administrator.
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Select Service Configuration in the location pane.
  4. Select Portal Desktop under Portal Server Configuration.
  5. Specify the fully distinguished name (dn) for the authentication-less or anonymous user to the Authorized Authentication-less User DNs and Passwords list. The format of the list is:
  6. user dn|user password

    For example:

    uid=siroeauthless,ou=people,o=adventuresportscafe.com,dc=siroe,dc=com|siroeauthless

    Note: the Enterprise Sample Portal adds the ascauthlessanonymous user to the list.

  7. The Default Authentication-less user DN field determines which anonymous portal the end user is directed to by default.
  8. Click Save.

  To Setup the Anonymous Portal Desktop

  1. Login to the Access Manager administration console as administrator.
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Use the View menu in the navigation pane and select Users.
  5. Select the siroeauthless user.
  6. Use the View menu in the User pane and select Services.
  7. Click Edit for the Portal Desktop Service.
  8. Use Manage Channels and Containers to setup the Portal Desktop for the anonymous portal.

To Access the Anonymous Portal

A user is directed to the anonymous portal if the user does not have a valid Access Manager session and the Portal Desktop has been configured for Anonymous support. The anonymous portal that the user is directed to is determined by the URL parameter:

desktop.suid

If this parameter is not present in the Portal Desktop request then the user is directed to the default anonymous portal. Otherwise, the user is directed to the anonymous portal based on the user account specified by the parameter. For example, the anonymous Enterprise Sample Portal could be directly accessed with the URL:

http://siroe.com/portal/dt?desktop.suid=uid=siroeauthless,ou=people,o=adventuresportscafe.com,dc=siroe,dc=com


Presentation Templates

You can modify the following Enterprise Sample Portal template pages to suit your needs:

Copy the Enterprise Sample Portal templates from /etc/opt/SUNWps/desktop/asc to your custom directory under /etc/opt/SUNWps/desktop and only modify the templates in the custom directory. The Portal Desktop type needs to be changed to use the templates in your custom directory.

  To Modify the Portal Desktop Type

  1. Login to the Access manager administration console as administrator.
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Use the View menu in the navigation pane and select Services.
  5. Click the properties for the Portal Desktop service.
  6. Modify the Portal Desktop Type setting with your custom directory name. This field supports a comma separated list of values.
  7. Select Save.

  To Define the Login Failed Page

You can specify a custom login failed page when a user fails to authenticate to Portal Server.

  1. Login to the Access manager administration console as administrator.
  2. By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  3. Navigate to the adventuresportscafe.com organization.
  4. Select Services from the View menu.
  5. Click the properties icon arrow next to Core under Authentication Modules.
  6. Specify the login failed URL for the Default Failure Login URL.

  To Define the Logout Page

You can specify a custom logout page for users when they log out of the portal. This is accomplished by using the Access Manager Logout service with the goto parameter specified for the custom logout page. The Enterprise Sample Portal uses this approach when a user logs out of the portal to redirect to the anonymous portal.

  1. Navigate to the directory /etc/opt/SUNWps/desktop/asc
  2. Edit the logout.jsp file.
  3. For example:

    onClick="location.href='/amserver/UI/Logout?goto=/logout.html'"

    The Enterprise Sample Portal specifies the custom logout page in the following files:

    • /etc/opt/SUNWps/desktop/asc/logout.jsp
    • /etc/opt/SUNWps/desktop/asc/error/error.template
    • /etc/opt/SUNWps/desktop/asc/error/noneditablechannel.template
    • /etc/opt/SUNWps/desktop/asc/error/noprivilege.template
    • /etc/opt/SUNWps/desktop/asc/error/unknownchannel.template

  To Define the Error Pages

The Enterprise Sample Portal template error pages are defined in the table below. Each error page specifies the company branding and logout URL.

Table 3  Error Page Templates

Error Template

Error Condition

/etc/opt/SUNWps/desktop/asc/error/error.template

general Portal Desktop error

/etc/opt/SUNWps/desktop/asc/error/noneditablechannel.template

end user session has timed out or attempting to edit a non-editable channel

/etc/opt/SUNWps/desktop/asc/error/noprivilege.template

end user does not have permission to access the Portal Desktop

/etc/opt/SUNWps/desktop/asc/error/unknownchannel.template

end user is attempting to access a channel that is not defined


Fixing the tabLevel property bug

The current release has a bug with creation of top-level tabs. Clicking on a newly created top-level tab from the Enterprise Sample Portal Desktop causes a ProviderException with a stack trace similar to the one shown below.

ERROR: DesktopServlet.handleException()

com.sun.portal.providers.ProviderException: JSPProvider.processJSPFile(): jsp=tab.jsp,

com.sun.portal.providers.context.ProviderContextException: PSProviderContext.getIntegerProperty():

com.sun.portal.desktop.context.ContextError: DPPropertiesContext.getIntegerProperty(): property not found in profile for channel=MyTabContainer, key=tabLevel

com.sun.portal.desktop.taglib.DesktopTaglibException: PSProviderContext.getIntegerProperty(): com.sun.portal.desktop.taglib.DesktopTaglibException: JSPProvider.processJSPFile(): jsp=tab.jsp,

at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:913)

at com.sun.portal.providers.jsp.JSPProvider.processJspFile(JSPProvider.java:810)

at com.sun.portal.providers.jsp.JSPProvider.getContent(JSPProvider.java:579)

Note: This exception does not occur for nested tabs.

The stack trace indicates that this error occurs because tab.jsp is unable to find a property tabLevel in the display profile for MyTabContainer. This bug can be fixed by making few minor changes in the file /etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider/tab.jsp.

The fix is to add a try-catch block that can handle the condition of the tabLevel property not being present.

Here is the changed code for

/etc/opt/SUNWps/desktop/asc/JSPTabContainerProvider/tab.jsp:

<%@ page session="false"

%><%@ taglib uri="/tld/desktop.tld" prefix="dt"

%><%@ taglib uri="/tld/desktopContainerProviderContext.tld" prefix="dtcpc"

%><%@ taglib uri="/tld/desktopProviderContext.tld" prefix="dtpc"

%><%@ taglib uri="/tld/desktopTab.tld" prefix="tab"

%><%@ taglib uri="/tld/jx.tld" prefix="jx"%>

<dt:obtainContainer container="$JSPProvider">

<% try { %>

<dtpc:getIntegerProperty id="tabLevel" key="tabLevel"/>

  <jx:declare id="tabLevel" type="Integer"/>

  <% if (tabLevel.intValue() == 0 ) { %>

<jsp:include page="header.jsp" flush="true"/>

<%@ include file="primaryContainer.jsp"%>

<% } else { %>

<%@ include file="secondaryContainer.jsp"%>

<% }

} catch (Exception e) { %>

<%@ include file="secondaryContainer.jsp"%>

<% } %>

<tab:tabContainerProvider>

<tab:getSelectedTabName id="containedChannel" scope="request"/>

<dtcpc:getContent channel="$containedChannel"/>

</tab:tabContainerProvider>

</dt:obtainContainer>


Adding New Layouts

The Enterprise Sample Portal relies on the CSS file for positioning of channels on the page. When creating new layouts or modifying existing layouts, review the Enterprise Sample Portal CSS files under /opt/SUNWps/web-src/asc/css.

You will see various CSS files. The CSS file are available and are selected based on client browser type and client operating system. The CSS file selection logic can be found in writeCSS function in /opt/SUNWps/web-src/asc/js/util.js.

The Enterprise Sample Portal supports layout=3 (THIN-WIDE-THIN) layout.

You can extend the code to support multiple layouts by modifying the file /etc/opt/SUNWps/desktop/asc/JSPTableContainerProvider/table.jsp.

In table.jsp, replace the code in Listing 1 with the code in Listing 2.

Listing 1

<!-- Begin Left Column of Channels -->

<div class="tableContainerColumnLeft">

<dttable:getColumns id="channels" column="left" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="center"/>

</jsp:include>

</div>

<!-- End Left Column of Channels -->

<!-- Begin Middle Column of Channels -->

<div class="tableContainerColumnCenter"">

<dttable:getColumns id="channels" column="center" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="center"/>

</jsp:include>

</div>

<!-- End Middle Column of Channels -->

<!-- Begin Right Column of Channels -->

<div class="tableContainerColumnRight">

<dttable:getColumns id="channels" column="right" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="center"/>

</jsp:include>

</div>

<!-- End Right Column of Channels -->

Listing 2

You can find the original code in /etc/opt/SUNWps/desktop/asc/JSPTableContainerProvider/table.jsp starting at Line # 78

<dtpc:getIntegerProperty key="layout" id="layout"/>

<jx:declare id="layout" type="Integer"/>

<!-- start table-container -->

<% if (layout == 1) { %>

<!-- THIN-WIDE layout -->

<!-- Begin Left Column of Channels -->

<div class="tableContainerColumnLeft">

<dttable:getColumns id="channels" column="left" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="left"/>

</jsp:include>

</div>

<!-- End Left Column of Channels -->

<!-- Begin Right Column of Channels -->

<div class="tableContainerColumnCenter">

<dttable:getColumns id="channels" column="right" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="center"/>

</jsp:include>

</div>

<!-- End Right Column of Channels -->

<% } else if (layout == 3) { %>

<!-- THIN-WIDE-THIN layout -->

<!-- Begin Left Column of Channels -->

<div class="tableContainerColumnLeft">

<dttable:getColumns id="channels" column="left" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="left"/>

</jsp:include>

</div>

<!-- End Left Column of Channels -->

<!-- Begin Middle Column of Channels -->

<div class="tableContainerColumnCenter">

<dttable:getColumns id="channels" column="center" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="center"/>

</jsp:include>

</div>

<!-- Begin Right Column of Channels -->

<div class="tableContainerColumnRight">

<dttable:getColumns id="channels" column="right" scope="request"/>

<jsp:include page="column.jsp" flush="true">

<jsp:param name="columnName" value="right"/>

</jsp:include>

</div>

<!-- Begin Right Column of Channels -->

<% } else if (layout == 4) { %>

<!-- Add custom layout here -->

<% } %>

</div><!-- end table-container -->

After you make modifications to these files, redeploy the portal web application using the utility: /opt/SUNWps/bin/deploy.

The Enterprise Sample Portal relies on the CSS file for positioning of channels on the page. When creating new layouts or modifying existing layouts, review the Enterprise Sample Portal CSS files under /opt/SUNWps/web-src/asc/css.

You will see various CSS files. The CSS file are available and are selected based on client browser type and client operating system. The CSS file selection logic can be found in writeCSS function in /opt/SUNWps/web-src/asc/js/util.js.

After you make modifications to these files, redeploy the portal web application using the utility: /opt/SUNWps/bin/deploy


Note

Sun is not responsible for the availability of third-party Web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused by or in connection with the use of or reliance on any such content, goods, or services that are available on or through such sites or resources.



How to Report Problems and Provide Feedback

If you have problems, contact Sun customer support using one of the following mechanisms:

So that we can best assist you in resolving problems, please have the following information available when you contact support:

You might also find it useful to subscribe to the following interest groups, where Portal Server topics are discussed:


Sun Welcomes Your Comments

Sun is interested in improving its documentation and welcomes your comments and suggestions.

To share your comments, go to http://docs.sun.com and click Send Comments. In the online form, provide the document title and part number. The part number is a seven-digit or nine-digit number that can be found on the title page of the book or at the top of the document. For example, the title of this book is Sun Java System Portal Server 2005Q4 , and the part number is 819-3629-10.


Additional Sun Resources

Useful Sun Java System information can be found at the following Internet locations:


Copyright � 2005 Sun Microsystems, Inc. All rights reserved.

Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries.

SUN PROPRIETARY/CONFIDENTIAL.

U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements.

Use is subject to license terms.

This distribution may include materials developed by third parties.

Portions may be derived from Berkeley BSD systems, licensed from U. of CA.

Sun, Sun Microsystems, the Sun logo, Java and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries.


Copyright � 2005 Sun Microsystems, Inc. Tous droits r�serv�s.

Sun Microsystems, Inc. d�tient les droits de propri�t� intellectuels relatifs � la technologie incorpor�e dans le produit qui est d�crit dans ce document. En particulier, et ce sans limitation, ces droits de propri�t� intellectuelle peuvent inclure un ou plusieurs des brevets am�ricains list�s � l'adresse http://www.sun.com/patents et un ou des brevets suppl�mentaires ou des applications de brevet en attente aux Etats - Unis et dans les autres pays.

Propri�t� de SUN/CONFIDENTIEL.

L'utilisation est soumise aux termes du contrat de licence.

Cette distribution peut comprendre des composants d�velopp�s par des tierces parties.

Des parties de ce produit pourront �tre d�riv�es des syst�mes Berkeley BSD licenci�s par l'Universit� de Californie.

Sun, Sun Microsystems, le logo Sun, Java et Solaris sont des marques de fabrique ou des marques d�pos�es de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pays.

Toutes les marques SPARC sont utilis�es sous licence et sont des marques de fabrique ou des marques d�pos�es de SPARC International, Inc. aux Etats-Unis et dans d'autres pays.