Sun Java System Portal Server 7 Enterprise Sample Guide

Chapter 5 Presentation Templates

You can define error pages for your Portal Server desktop by using the Enterprise Sample template error pages defined in the table below. Each error page specifies the company branding and logout URL.

This chapter contains sections describing the following procedures:

Error Page Templates

PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/error.template

General Portal Desktop error.

PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/noneditablechannel.template

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

PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/noprivilege.template

End user does not have permission to access the Portal Desktop.

PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/unknownchannel.template

End user is attempting to access a channel that is not defined.

Using the Sample Template

ProcedureTo Use Sample Templates

Steps
  1. Copy the Enterprise Sample templates from PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/ to your custom directory under PortalServer-DataDir/portals/portal-ID/desktop and only modify the templates in the custom directory.

    Copy all the templates and JSP files from the sample directory to your custom directory before changing the portal desktop type service attribute.

  2. Login to the Portal Server management console as administrator (amadmin).

  3. Click the Portals tab.

  4. Click the portal-ID in the Portals list.

  5. Select EnterpriseSample [Org] in the Select DN list.

  6. Modify the Desktop Type setting with your custom directory name.

    This field supports a comma separated list of values.

  7. Select Save.

Defining the Login Failed Page

ProcedureTo Define the Login Failed Page

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

Steps
  1. Login to the Access Manager console as administrator.

    By default, when you log in, Identity Management is selected in the location pane, and Organizations is selected in the Navigation pane.

  2. Select the EnterpriseSample organization.

  3. Select Services from the View menu.

  4. Click the properties icon arrow next to Core under Authentication Modules.

  5. Specify the login failed URL for the Default Failure Login URL.

    The Enterprise Sample specifies the default login failure URL for the AdventureSports Cafe as http://siroe.com/portal/dt?loginfailed=true. The JSP file that determines what to do with a login failure is PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/ASCTabContainer/anonymous.jsp.

  6. Customize the anonymous.jsp file in PortalServer-Datadir/portals/portal-ID/desktop/enterprise_sample/ASCTabContainer directory.

Defining the Logout Page

ProcedureTo 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 uses this approach when a user logs out of the portal to redirect to the anonymous portal.

Steps
  1. Navigate to the directory Navigate to the directory

    /var/opt/SUNWportal/portals/portal-ID/desktop/enterprise_sample

  2. Edit the logout.jsp file.

    For example:


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

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


    PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/logout.jsp
    PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/error.template
    PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/noneditablechannel.template
    PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/noprivilege.template
    PortalServer-DataDir/portals/portal-ID/desktop/enterprise_sample/error/unknownchannel.template