Sun ONE logo     Previous      Contents      Index      Next     
Sun ONE Portal Server 6.0 Deployment Guide



Appendix D      Sun ONE Portal Server Quick Start

This appendix provides the tasks you need to get started using Sun™ ONE Portal Server 6.0. This appendix covers installing and configuring the product, and creating adding channels to the Desktop, and creating custom providers.

This appendix contains the following sections:

Locating Product Reference Information

You can interact with Portal Server as an administrator, developer, customizer, and user. At times, these distinctions might overlap. For example, as a developer, you might use both the Portal Server API and the Sun™ ONE Identity Server administration console to customize and configure the availability, content, and layout of the portal and its providers.

This section provides a set of references to assist you with the specific roles you fulfill in administering, customizing and developing Portal Server.

Installation Resources

The Sun ONE Portal Server 6.0 Installation Guide is available online at:

http://docs.sun.com/source/816-6358-10/index.html

Download the free trial version of the product at:

http://wwws.sun.com/software/download/products/sunone/3dee7b9e.html

Administration Resources

Information on understanding the Identity Server product and its administration console is available online at:

http://docs.sun.com/source/816-6359-10/dsameadm.html#23178

The Sun ONE Portal Server 6.0 Administrator's Guide is available online at:

http://docs.sun.com/source/816-6359-10/index.html

Customization Resources

The Sun ONE Portal Server 6.0 Desktop Customization Guide is available online at:

http://docs.sun.com/source/816-6361-10/index.html

Development Resources

The Sun ONE Portal Server 6.0 Developer's Guide is available online at:

http://docs.sun.com/source/816-6362-10/index.html

The Sun ONE Portal Server 6.0 Migration Guide is available online at:

http://docs.sun.com/source/816-6360-10/index.html

Installing Portal Server

This section provides an overview of and sample output from a Portal Server installation.

Portal Server Installation Tips

Note the following when installing Portal Server:

  • You need to perform the installation as root.
  • Before beginning the installation, check that no services are using ports 80, 8088 or 8900 (port 80 is used by Sun™ ONE Web Server, 8088 is used by the Web Server administration console, and port 8900 is used by the Sun™ ONE Directory Server administration console). You can change these ports if desired, but at a minimum, make sure that they are not already in use.
  • If you are deploying on an application server, verify the server's port usage. For example, on the Sun ONE Application Server, the default administration console port is 4848. (7001 is the default for the BEA WebLogic console, and 900 is the default for the IBM WebSphere console.)
  • Run ./pssetup in the directory where you unpacked the Portal Server installation file. See the Sun ONE Portal Server 6.0 Installation Guide for details.

Sample Portal Server Installation

The following sample installation shows the interaction with the Portal Server pssetup script. It creates an organization test the on host1 in the siroe.com domain and installs the sample portal.



Note

This installation is for Portal Server with Sun™ ONE Web Server as the web application container. When installing an application server, the installation script is slightly different.





Code Example D-1    Sample Portal Server Installation 

#./pssetup
********************************************************************
Portal Server (6.0)
********************************************************************
Log at /var/sadm/install/logs/pssetup.27678/setup.log
Sun ONE(tm) Portal Server 6.0

<Legal information>

Sun ONE(tm) Portal Server 6.0 License/Rev 1.1
     30July02/WF
Do you accept? yes/[no] yes

Install options:
1) Install Portal Server
2) Install Directory Server only
3) Install Migration Tools
4) Exit
Choice? [4] 1
Do you want to use an existing JDK? y/[n] n
What is the installation base directory? [/opt]
What is the hostname of this server? [host1]
What is the sub-domain name for host1? (. for none) [sjc ] .
What is the domain name for host1? [siroe.COM]
What is the ip address of host1.siroe.COM? [xxx.xxx.xxx.xxx]
Run SSL on host1? y/[n]
What port should be used to access the Portal Server? [80]
What is the organization name? [siroe.COM] test
Use an existing Directory Server? y/[n]
What is the Directory Server base directory? [/usr/ldap]
What port should be used to access the Directory Server? [389]
What is the Directory Server administration port? [8900]
What is the root suffix of the directory tree? [o=isp ]
What is the directory manager? [cn =Directory Manager]
What is the Web Server administrator? [admin]
What is the Web Server administration port? [8088]
What is the passphrase for this server? Again? <admin_password> twice
What is the deployment URI? [/portal]
Install the sample portal? [y]

JDK installation summary
------------------------
Directory: /usr/java_1.3.1_04

Directory Server installation summary
-------------------------------------
Base Directory: /usr/ldap
Organization: mde
Host: host1.siroe.COM
Port: 389
Instance: host1
Root Suffix: o=isp
Directory Manager: cn=Directory Manager
Administrator: admin
Administration Port: 8900

Web Server installation summary
-------------------------------
Base Directory: /opt
Administrator: admin
Administration Port: 8088

Identity Server installation summary
------------------------------------
Base Directory: /opt
Access URL: http://host1.siroe.COM:80
Administrator: amadmin

Portal Server installation summary
----------------------------------
Deploying into Web Server
Deploy Instance: host1.siroe.COM
Base Directory: /opt
Deployment URI: /portal
Sample Portal: y

Use these settings? [y]/n

Installing JDK...
Installing Directory Server...
Installing Identity Server...
Installing Portal Server...

Installation took 14.15 minutes.

Installation took 14.15 minutes.
1) Install Migration Tools
2) Exit
Choice? [2] 1

Migration Tools installation summary
------------------------------------
Base Directory: /opt

Installing Migration Tools...

Installation took .08 minute.

All available components have been installed.
Setup complete.
#

At this point the installation is complete, but Portal Server will not be started by the install. To start Portal Server, type:

/etc/init.d/amserver start

or

InstallDir/SUNWam/bin/amserver start

where InstallDir is the directory selected during installation. The default is the /opt directory.

To Verify That Portal Server Is Running

  • In a browser, access the Identity Server administration console:
  • http://portalhost/amconsole

    You must specify the Fully Qualified Domain Name (FQDN) of the Portal Server host, otherwise the login screen displays continually without authenticating. The login name is amadmin and the password is what you specified during installation as the passphrase.

To Change Font Size for the Administration Console

If you are using a Netscape browser that causes large fonts to be displayed in the Identity Server administration console, change the font size as follows:

  1. Log in to the Identity Server administration console as administrator.
  2. Select Service Management in the View drop-down menu.
  3. Click the Properties icon beside Client Detection in the navigation pane.
  4. In the Client Types box, click the line that begins with clientType=genericHTML.
  5. In the edit box below the list box, scroll to the right and replace UTF-8 with ISO-8859-1.
  6. Click Remove to delete the current genericHTML entry then click Add to add the new entry.
  7. Click Save.
  8. Log out of the administration console then log back in to see the smaller font size.

Configuring Portal Server (Post-Installation)

This section describes the most common configuration issues after installing Portal Server.

To Access the Anonymous Desktop Through the Portal Server Host Name (index.html File)

To access the Desktop login page using a URL in form http://psservername, you add some JavaScript™ code to the web server's index.html file in the /opt/SUNWam/public_html directory.

  1. Add the following JavaScript code to the index.html file. This example assumes that /portal/dt is the user's redirect URL.

  2. <HTML>
    <HEAD>
    <SCRIPT>
    document.location.href="/portal/dt?psdt.suid=uid=authlessanonymous,ou=
    People,o=
    organization,o=isp" <-- for authless anonymous

    </SCRIPT>
    </HEAD>
    </HTML>

    Replace organization with your appropriate organization.

  3. Verify that you can now access the anonymous Desktop by typing the server name in the browser.

To Create a Sample Portal User

  1. Log in to the Identity Server administration console as administrator.
  2. By default, when you log in, User Management is selected in the View menu, and Organizations is selected in the Show menu.
  3. Navigate to the organization or suborganizaiton where the user will be created.
  4. Choose Users from the Show menu and click New.
  5. The Create User template appears in the data pane.

  6. Type in the user information and click Create.
  7. The new user appears in the navigation pane.

To Access the Desktop Attributes Page

  1. Log in to the Identity Server administration console as administrator.
  2. By default, when you log in, User Management is selected in the View menu, and Organizations is selected in the Show menu.
  3. Navigate to the organization for which you want to configure the Desktop.
  4. Choose Services from the Show menu.
  5. Click the Properties arrow beside Desktop.
  6. The Desktop attributes page appears in the data pane.

To Configure a Non-tabbed Desktop

  1. Access the Desktop Attributes page.
  2. If necessary, see "To Access the Desktop Attributes Page."

  3. Change the Default Channel Name attribute to JSPTableContainer.
  4. Click Save.
  5. Verify that the non-tabbed Desktop appears by logging out as the administrator and logging back in as a user.
  6. If necessary, see "To Create a Sample Portal User."

To Configure a Tabbed Desktop

  1. Access the Desktop Attributes page.
  2. If necessary, see "To Access the Desktop Attributes Page."

  3. Make sure that the Default Channel Name attribute is JSPTabContainer.
  4. If necessary, make the change and click Save.

  5. Edit the tabbed Desktop display profile.
    1. Obtain the existing display profile profile by running the dpadmin command, for example:

    2. dpadmin list -u "uid=amAdmin,ou=People,o=siroe,o=isp" -w password -d "o=siroe,o=isp" > /tmp/org.xml


      This command outputs the display profile for the siroe organization to a file named /tmp/org.xml.

    3. Edit the three sample portal tabs as needed:
      • MyFrontPageTabPanelContainer - Provides the "front page" tab
      • SamplesTabPanelContainer - Contains sample channel providers
      • SearchTabPanelContainer - Provides sample search functionality

      For example, to change the captions of these tabs as seen on the Desktop, search the display profile output file for the relevant containers within the <TabProperties> and </TabProperties> tags and change the title property. To change channels, edit the channels within the <Selected> and <Available> tags.

    4. When done making changes, use the dpadmin command to re-insert this display profile back into the organization, for example:

    5. dpadmin modify -u "uid=amAdmin,ou=People,o=siroe,o=isp" -w password -d "o=siroe,o=isp" /tmp/org.xml


      The new display profile is active; there is no need to restart Portal Server.

  6. Verify that the modified Desktop appears by logging out as the administrator and logging back in as a user.
  7. If necessary, see "To Create a Sample Portal User."

To Add a Tab to JSPTabContainer

A tab is represented by a table container. (A tab can be any container type but in general a table container is sufficient). To add a new tab, you must first define the container, then register that container in JSPTabContainer, which "houses" the tabs.

  1. Create the necessary display profile.
    1. Define the new collection within <Collection name="TabProperties"> in JSPTabContainer, for example:

    2. ...
      <Collection name="TabProperties">
        <Collection name="NewTabPanelContainer">
          <String name="title" value="My Front Page"/>
          <String name="desc" value="Your front page"/>
          <Boolean name="removable" value="false"/>
          <Boolean name="renamable" value="true"/>
          <Boolean name="predefined" value="true"/>
        </Collection>
      ...
      </Collection>
      ...

    3. Add entries to the <Available> and <Selected> tags, for example:

    4. ...
      <Available>
        <Reference value="NewTabPanelContainer"/>
      ...
      </Available>
      ...
      <Selected>
        <Reference value="NewTabPanelContainer"/>
      ...
      </Selected>
      ...

    5. Define a container for NewTabPanelContainer, for example:


    6. <Container name="NewTabPanelContainer" provider="JSPTableContainerProvider">
        <Properties>
        <String name="title" value="New Container Channel"/>
        <String name="contentPage" value="tabtable.jsp"/>
        <String name="description" value="This is a test for front table containers"/>
        <String name="Desktop-fontFace1" value="Sans-serif"/>
        <Collection name="categories">
          <String value="Personal Channels"/>
          <String value="Sample Channels"/>
        </Collection>
        <Collection name="Personal Channels">
          <String value="UserInfo"/>
          <String value="MailCheck"/>
        </Collection>
        <Collection name="Sample Channels">
          <String value="SampleJSP"/>
          <String value="SampleXML"/>
        </Collection>
        </Properties>
        <Available>
          <Reference value="UserInfo"/>
          <Reference value="MailCheck"/>
          <Reference value="SampleJSP"/>
          <Reference value="SampleXML"/>
        </Available>
        <Selected>
          <Reference value="UserInfo"/>
          <Reference value="MailCheck"/>
          <Reference value="SampleJSP"/>
          <Reference value="SampleXML"/>
        </Selected>
        <Channels>
          ...
        </Channels>
      </Container>

  2. Load the display profile into LDAP by using the dpadmin command, for example:

  3. dpadmin modify -u "uid=amAdmin,ou=People,o=siroe,o=isp" -w password -d "o=siroe,o=isp" /tmp/org.xml


  4. Verify that the modified Desktop appears by logging out as the administrator and logging back in as a user.
  5. If necessary, see "To Create a Sample Portal User."

To Change the Channel Layout for a Table Container

You can configure a channel layout for each table container that houses channels for a tab (or JSPTableContainer for the channels in a non-tabbed desktop). To do this, edit the organization display profile XML and add the layout property to the table container.

  1. You can change the layout for a particular table container by modifying (or adding) the following property in the table container's display profile:
  2. <Integer name="layout" value="value"/>

    where value is:

    1 = Thin-wide, two columns

    2 = Wide-thin, two columns

    3 = Thin-wide-thin, three columns

  3. Reload the display profile to LDAP by running the dpadmin command with the modify command, loading it at the top-most node in the directory by using the -g option.
  4. For example:


    dpadmin modify -u "uid=amAdmin,ou=People,o=sesta.com,o=isp" -w password -g dp-providers.xml



    Note

    You can also use the Sun ONE Identity Server administration console to change the channel layout. Use the Channel and Container Management link for the Desktop service to do so.



To Deploy New Portal Content

  • To make existing or new web content available from the Portal Server's web server, place the content under the /opt/SUNWam/public_html/ directory. If desired, you can change this directory to something more convenient.

Customizing the Desktop

This section covers a tasks for customizing the Portal Server Desktop.

To Configure the Desktop Banner

  1. Change to the appropriate container directory.
  2. For example, for the JSPTabContainer,

    cd /etc/opt/SUNWps/desktop/default/JSPTabContainer

    For the anonymous Desktop banner (excluding the menu bar for Home, Options, Content, Layout, and so on), change to the /etc/opt/SUNWps/desktop/anonymous/JSPTabContainer directory. Change JSPTabContainer to JSPTableContainer if you are using the table-based Desktop.

  3. Edit the header.jsp file and modify the following line:

  4. <td bgcolor="#333366"><img src="<dt:scontent/>/images/productName.jpg" width="274" height="38" alt="Sun ONE Portal Server"></td>

    Replace <dt:scontent/>/images/productName.jpg with a reference to an alternate image.

    For example, if you use /opt/SUNWam/public_html/images/newimage.gif, then use /images/newimage.gif as your replacement text. The <dt:scontent/> tag references image files from the Sun ONE Portal Server web application archive. Your own custom images need to be placed elsewhere, so the <dt:scontent/> tag is not used.

  5. Place your file in the appropriate directory.
  6. You can place your custom image files under the web server document root, by default /opt/SUNWam/public_html, or you can deploy them in a custom web application archive. See the web server documentation for information on how to deploy a web application archive.

  7. Run the touch command on the container's top-level JSP file.
  8. For example,

    touch tab.jsp

  9. Reload the Desktop to verify the change.

To Add Channels and Container Channels to the Desktop

Portal Server uses channels to generate content for the Desktop. Generally, content is created by using JSP or template files. You configure channels by using properties, which affect the content, position on the Desktop, and channel controls. When you customize the value of properties that a channel receives, you customize that channel. (If you customize the value of properties for a provider, then all channels in the Desktop that use this provider are customized.)

Channels that contain other channels are called containers. Containers arrange channel content on the Desktop.

There are two methods you can use to add containers and channels to the Desktop:

  • By using the Identity Server administration console (Edit Channels and Channel and Container Management links).
  • By running the dpadmin command to upload an XML file with the necessary channel additions to the display profile into LDAP.

To add channels and containers by using the Identity Server administration console:

  1. Log in to the Identity Server administration console as administrator.
  2. Navigate to User Management by choosing View User Management.
  3. Select the organization, suborganization, or role to which you want to add a channel.
  4. When you log in as a delegated administrator, you are automatically taken to the organization, suborganization, or role to which you have administrative access.

  5. Choose Services from the Show menu.
  6. Click the properties arrow next to Desktop in the navigation pane.
  7. The Desktop attributes page appears in the data pane.

  8. In the Desktop page, click the Channel and Container Management link.
  9. The Channels page appears, with the container path set at the root.

  10. Click the Container that you want to add the channel or container to.
  11. Table D-1 explains a few of the containers. This is a two column-table. The first column lists the container and the second column provides a description.

    Table D-1    Partial List of Containers Displayed on the Channels Page

    Container

    Description

    JSPTableContainer

    For non-tabbed Desktops

    MyFrontPageTabPanelContainer

    The Front Page tab

    SamplesTabPanelContainer

    The Samples tab

    SearchTabPanelContainer

    The Search tab

    After you make your selection, the top of the page displays the container path where the channel will be added. Defined channels and container, if any, appear in lists.

  12. Click Add to add a container channel or channel.
  13. To add a container channel, click Add under Container Channel. To add a channel, click Add under Channel. The Add Channel page appears.

  14. Add the new channel to this container, make the channel available and visible on the Desktop, type a channel name, and select the type of provider from the menu. Table D-2 list the most useful providers. This is a two column table. The first column lists the provider name and the second column provides a description.
  15. Table D-2    Common Providers

    Provider Name

    Description

    Template Directory

    URLScraperProvider

    Uses the Rewriter to construct the URL information and an XML file to describe how to display it.

    N/A

    BookmarkProvider

    Enables a user to add or remove URLs from a list of bookmarks.

    bookmark

    JSPProvider

    Obtains content from one or more JSP™ files.

    jsp

    RSSProvider

    Enables you to specify a local HTML file for the content.

    rss

  16. Click Create.
  17. You are returned to the Channels page. The added channel appears in Channels list.

  18. Click the Edit link next to the added channel.
  19. The Edit Channel page appears.

  20. Make changes to the properties as needed then click Save.
  21. Verify that the added channel appears in the Desktop logging out as the administrator and logging back in as a user.
  22. If necessary, see "To Create a Sample Portal User."

To Add a Custom Tab to the Desktop

  1. Log in to the portal as a user.
  2. If necessary, see "To Create a Sample Portal User."

  3. Click the Tabs link at the top of the page.
  4. The Current Tab Settings page appears.

  5. Click the Make a New Tab link.
  6. The Make a New Tab page appears.

  7. Fill out the form and click Finished.
  8. If you are making the tab from scratch, a page appears where you select the channels for the tab. Make your selections and click Finished.

  9. The Desktop appears with the new tab.

Creating Custom Providers

This section describes how to implement a custom provider. See the Sun ONE Portal Server 6.0 Developer's Guide for more information. Before starting, create a sample user as described in the section titled "To Create a Sample Portal User".

To Create a Custom Provider

  1. Choose the type of provider that you want to create.
  2. You can choose between building block providers and content providers. For example, BookmarkProvider is a content provider, whereas an XMLProvider is a building block provider. There are three out-of-the box providers:

    • JSPProvider - Uses JavaServer Pages™ technology to create the content for a channel on the Desktop.
    • URLScraperProvider - Retrieves and displays content from a given URL.
    • XMLProvider - Converts and displays an XML file according to the specified style sheet.

  3. Choose the presentation method.
  4. There are three choices:

    • The provider can get the content from JSP or template files.
    • Channel template files are stored in a directory based on the name of the channel or the name of the provider that is used by the channel. The channel directory for the provider is created under the template root directory. By default, this is:
    • /etc/opt/SUNWps/desktop/desktoptype/channeldirectory/templatefiles

    • Some of the JSP files are stored in the /etc/opt/SUNWps/desktop/default/provider directory and some are stored in the /etc/opt/SUNWps/desktop/default directory. Storing the files in the /etc/opt/SUNWps/desktop/default directory enables the files to be shared among multiple channels.

  5. Create a provider class file.
    1. You specify the provider deployment in the /etc/opt/SUNWps/desktopconfig.properties file. By default, the provider class base directory is /etc/opt/SUNWps/desktop/classes. For instant deployment, drop the JAR file in the directory specified in the providerClassBaseDir variable in the desktopconfig.properties file.
    2. Edit your source class.
    3. For example, create the HelloWorldProvider class file as shown in Code Example D-2.



      Code Example D-2    HelloWorldProviderP.java File  

      package custom;

      import java.net.URL;
      import javax.servlet.http.HttpServletRequest;
      import javax.servlet.http.HttpServletResponse;

      import com.sun.portal.providers.Provider;
      import com.sun.portal.providers.ProviderException;
      import com.sun.portal.providers.UnknownEditTypeException;

      public class HelloWorldProviderP implements Provider {
          public void init(
              String name, HttpServletRequest req
          ) throws ProviderException { }

          public StringBuffer getContent(
              HttpServletRequest request, HttpServletResponse response
          ) throws ProviderException {
              return new StringBuffer("Hello World!");
          }

          public java.lang.StringBuffer getContent(java.util.Map m) throws ProviderException {
              return new StringBuffer("Hello, world!");
          }

          public StringBuffer getEdit(HttpServletRequest request, HttpServletResponse response) throws ProviderException {
              // Get the edit page and return it is as a StringBuffer.
              return null;
          }

          public java.lang.StringBuffer getEdit(java.util.Map m) throws ProviderException {
              return null;
          }

          public int getEditType() throws UnknownEditTypeException {
              return 0;
          }

          public URL processEdit(HttpServletRequest request, HttpServletResponse response) throws ProviderException {
              return null;
          }

          public java.net.URL processEdit(java.util.Map m) throws ProviderException {
              return null;
          }

          public boolean isEditable() throws ProviderException {
              return false;
          }

          public boolean isPresentable() {
              return true;
          }

          public java.lang.String getTitle() throws ProviderException {
              return "HelloWorld Channel";
          }

          public java.lang.String getName() {
              return "HelloWorld!";
          }

          public java.lang.String getDescription() throws ProviderException {
              return "This is a sample HelloWorld channel";
          }

          public java.net.URL getHelp(javax.servlet.http.HttpServletRequest req) throws ProviderException {
              return null;
          }

          public long getRefreshTime() throws ProviderException {
              return 0;
          }

          public int getWidth() throws ProviderException {
              return 0;
          }
      }

  6. Compile the class and put it in the user defined class directory.

  7. javac -d /etc/opt/SUNWps/desktop/classes -classpath BaseDir/SUNWps/sdk/desktop/desktopsdk.jar:BaseDir/SUNWam/lib/servlet.jar HelloWorldProviderP.java

  8. Manually install the provider.
    1. Copy the file to provider class base directory, /etc/opt/SUNWps/desktop/classes. Or, copy the file to the location specified in the /etc/opt/SUNWps/desktop/desktopconfig.properties file.
    2. Create a provider definition file (for example, HelloChannelP.xml).
    3. The sample HelloWorldProvider XML fragments for the provider in the HelloProviderP.xml and XML fragments for the channel in the HelloChannelP.xml files are shown in Code Example D-3 and Code Example D-4 respectively.



      Code Example D-3    HelloProviderP.xml File

      <Provider name="HelloWorldProviderP" class="custom.HelloWorldProviderP">
          <Properties>
          </Properties>
      </Provider>



      Code Example D-4    HelloChannelP.xml File

      <?xml version="1.0" encoding="utf-8" standalone="no"?>
      <!DOCTYPE DisplayProfile SYSTEM "jar://resources/psdp.dtd">

      <Channel name="HelloWorldP" provider="HelloWorldProviderP">
          <Properties>
              <String name="title" value="Hello World Channel"/>
              <String name="description">This is a test of the hello world provider</String>
              <String name="width" value="thin"/>
              <String name="message" value="Hello World Test!!! - non-localized "/>
              <Locale language="en" country="US">
                  <String name="message" value="Hello World - I am speaking English in the United States!!!"/>
              </Locale>
          </Properties>
      </Channel>

  9. Upload the provider and channel XML fragments using the dpadmin command.
  10. For the sample HelloWorldProvider, upload the HelloProviderP.xml and HelloChannelP.xml XML fragments using the dpadmin command. That is, for example:

    dpadmin add -u dn_amadmin -w password -d distinguishedname HelloProviderP.xml

    dpadmin add -u dn_amadmin -w password -d distinguishedname HelloChannelP.xml

  11. Verify that the channel works. In a browser, type:
  12. http://hostname:port/portal/dt?provider=HelloWorldP


Previous      Contents      Index      Next     
Copyright 2003 Sun Microsystems, Inc. All rights reserved.