Login Director Portlet

This login portlet directs the user to a "default" desktop—the first desktop to which the user is entitled—and returns the user to that desktop when the user logs out.

Concepts Demonstrated by this Sample

The JSP portlet uses a backing file to authenticate users and direct them to the default desktop.

Location of Sample Files

This sample is located in the <BEA_HOME>/<WEBLOGIC_HOME>/samples/portal/portalApp/portalApp.work application.

How to Run the Sample

While you can run the portlet in the development environment, the full functionality of this portlet is visible only in streaming mode where multiple desktops and visitor entitlement rules exist. For more information, see Single File vs. Streamed Rendering.

To run the portlet in the development environment, see Viewing the Samples in Portal Samples.

To run the portlet in streaming mode, add the portlet to a page in sample.portal, then use the WebLogic Administration Portal to create a new desktop that uses sample.portal as a template. On the Desktop Properties page for the new desktop, click View Desktop to view the portlet.

How to Use the Sample in Your Portals

  1. Create a portal application. Make sure you create a Portal Application and add a Portal Web Project to it.
  2. Import or copy the following directories and files into your portal application and portal Web project. You may need to create the appropriate directories in your application:
    Import or copy this to this directory (create if necessary)

    <WEBLOGIC_HOME>/samples/portal/portalApp/
    sampleportal/portlets/login/director.portlet

    <PORTAL_APP>/<project>/portlets/login/
    <WEBLOGIC_HOME>/samples/portal/portalApp/
    sampleportal/portlets/login/director.jsp
    <PORTAL_APP>/<project>/portlets/login/
    <WEBLOGIC_HOME>/samples/portal/portalApp/
    sampleportal/WEB-INF/src/examples/login/DirectorBacking.java
    <PORTAL_APP>/<project>/
    WEB-INF/src/examples/login/
    <WEBLOGIC_HOME>/samples/portal/portalApp/
    sampleportal/WEB-INF/src/examples/login/DirectorUtil.java
    <PORTAL_APP>/<project>/
    WEB-INF/src/examples/login/
    <WEBLOGIC_HOME>/samples/portal/portalApp/
    sampleportal/WEB-INF/lib/yahoo_servlet.jar
    <PORTAL_APP>/<project>/
    WEB-INF/lib/
  3. Open your portal file and navigate the page where you want the portlet to appear.
  4. In the Data Palette window, drag the Login Director portlet onto a placeholder on the page.
  5. In the Property Editor window, set any relevant properties.
  6. Save the portal file.
  7. To view the portlet in a desktop, create a desktop in the WebLogic Administration Portal using the current .portal file as a template, and in the Desktop Properties page for the desktop, click View Desktop.

Related Topics

Portal Samples

Login Portlet