Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.portal.admin
Class PortalJspBase

    java.lang.Object
      |
      +--weblogic.servlet.jsp.JspBase
            |
            +--com.beasys.portal.admin.PortalJspBase

public abstract class PortalJspBase
extends weblogic.servlet.jsp.JspBase
implements PortalAdminConstants, PortalProfileConstants, JspPages, JspToolPages

Acts as a base class for all Portal JSP pages. Prescribes methods which faciltate portal run-time operation. Allows access to the `PortalServiceManager` URI, the Portal's working directory, the Portal's home page, the Portal's current page, and the `PortalProperties` `PortalManager`instantiations. Also, facilitates management of the portal run-time session, by providing convenience methods for setting and getting session values, and setting and getting JSP destinations. Implements several constants interface to reduce the burden of constant referencing by JSP pages.

Field Summary
`protected static boolean` | `debug` Whether debug mode is on.
`static java.lang.String` | `DESTINATION_TAG` A property name denoting the destination to be used with form submission.

Fields inherited from class weblogic.servlet.jsp.JspBase
`_servletConfig`

Fields inherited from interface com.beasys.portal.admin.PortalAdminConstants
`DEFAULT_DESTINATION, DESTINATION_URI, FALSE, IMMUTABLE_PORTAL_PAGE, PORTAL_COOKIE_TIMEOUT, PORTAL_GROUP, PORTAL_LOGGED_IN, PORTAL_MANAGER_A, PORTAL_NAME, PORTAL_PAGE, PORTAL_PROPERTIES_A, PORTAL_SESSION_TIMEOUT, PORTAL_USER, PROFILE_GROUP, PROFILE_USER, TRAFFIC_URI, TRANSACTION_SERVICE, TRANSACTION_TIMEOUT, TRUE, WORKING_DIR`

Fields inherited from interface com.beasys.portal.PortalProfileConstants
`PROFILE_ADDRESS, PROFILE_BANNER_COLOR, PROFILE_BODY_COLOR, PROFILE_CITY, PROFILE_COUNTRY, PROFILE_EMAIL, PROFILE_FIRST, PROFILE_LAST, PROFILE_PORTLET_BG_COLOR, PROFILE_PREFIX, PROFILE_REFRESH, PROFILE_REMINDER, PROFILE_SHOW_BORDERS, PROFILE_STATE, PROFILE_TIMEZONE, PROFILE_TITLE_FONT_COLOR, PROFILE_TITLEBAR_COLOR, PROFILE_ZIP`

Fields inherited from interface com.beasys.portal.admin.JspPages
`JSP_ALTERNATE_FOOTER, JSP_ALTERNATE_HEADER, JSP_BASE_DIRECTORY, JSP_BASE_HEADER, JSP_COLOR_PREFS, JSP_FOOTER, JSP_FULL_SCREEN_PORTLET, JSP_GEN_PREFS, JSP_HEADER, JSP_PORTAL, JSP_PORTAL_CONTENT, JSP_PORTAL_FRAMEWORK_DIRECTORY, JSP_PORTLET, JSP_TITLE_BAR, JSP_USER_ADD_PORTLETS, JSP_USER_HELP_FEATURES, JSP_USER_LAYOUT, JSP_USER_LOGIN, JSP_USER_REG, JSP_USER_REG_SUMMARY`

Fields inherited from interface com.beasys.portal.admin.JspToolPages
`JSP_TOOLS_ADD_PORTLETS, JSP_TOOLS_ADMIN_LOGIN, JSP_TOOLS_DIRECTORY, JSP_TOOLS_ERROR, JSP_TOOLS_ERROR_FOOTER, JSP_TOOLS_ERROR_HEADER, JSP_TOOLS_GROUP_ADD_PORTLETS, JSP_TOOLS_GROUP_COLORS, JSP_TOOLS_GROUP_HOME, JSP_TOOLS_GROUP_LAYOUT, JSP_TOOLS_GROUP_NEW, JSP_TOOLS_GROUP_PERSONALIZE, JSP_TOOLS_GROUP_USERS, JSP_TOOLS_GROUP_VIEW, JSP_TOOLS_PORTAL_COLORS, JSP_TOOLS_PORTAL_DEV_GUIDE, JSP_TOOLS_PORTAL_DEV_GUIDE_FEATURES, JSP_TOOLS_PORTAL_GROUPS, JSP_TOOLS_PORTAL_HELP, JSP_TOOLS_PORTAL_HELP_FEATURES, JSP_TOOLS_PORTAL_HOME, JSP_TOOLS_PORTAL_LAYOUT, JSP_TOOLS_PORTAL_NEW, JSP_TOOLS_PORTAL_PERSONALIZE, JSP_TOOLS_PORTAL_REMOVE, JSP_TOOLS_PORTAL_UPDATE, JSP_TOOLS_PORTAL_USERS, JSP_TOOLS_PORTAL_VIEW, JSP_TOOLS_PORTLET_NEW, JSP_TOOLS_PORTLET_REMOVE, JSP_TOOLS_PORTLET_UPDATE`

Fields inherited from interface com.beasys.portal.admin.JspPages
`JSP_ALTERNATE_FOOTER, JSP_ALTERNATE_HEADER, JSP_BASE_DIRECTORY, JSP_BASE_HEADER, JSP_COLOR_PREFS, JSP_FOOTER, JSP_FULL_SCREEN_PORTLET, JSP_GEN_PREFS, JSP_HEADER, JSP_PORTAL, JSP_PORTAL_CONTENT, JSP_PORTAL_FRAMEWORK_DIRECTORY, JSP_PORTLET, JSP_TITLE_BAR, JSP_USER_ADD_PORTLETS, JSP_USER_HELP_FEATURES, JSP_USER_LAYOUT, JSP_USER_LOGIN, JSP_USER_REG, JSP_USER_REG_SUMMARY`

Constructor Summary
`PortalJspBase()`

Method Summary
`static java.lang.String` | `cnvrtSC(java.lang.String theInpStr)` Given a string, substitute HTML entities for HTML special characters.
`static java.lang.String` | `createURL(javax.servlet.http.HttpServletRequest aRequest, java.lang.String destination, java.lang.String parameters)` Creates a portal framework URL from the given request.
`static java.lang.String` | `fixupRelativeURL(java.lang.String aURL, javax.servlet.http.HttpServletRequest aRequest)` With the system using jsp:forward the relative directories may not be set employed correctly.
`static java.lang.String` | `getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)` Returns the currently active portal page.
`static java.lang.String` | `getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)` Get the default destination specified in the registration.
`static java.lang.String` | `getHomePage(javax.servlet.http.HttpServletRequest aRequest)` Retrieves the portal home page specified by the start-up parameters for the portal.
`static boolean` | `getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)` Indicates whether a user is currently logged into the portal.
`static PortalManager` | `getPortalManager(javax.servlet.http.HttpServletRequest aRequest)` Retrieves the `com.beasys.portal.PortalManager` out of the request.
`static java.lang.String` | `getPortalPage(javax.servlet.http.HttpServletRequest aRequest)` Deprecated. replaced by getHomePage
`static PortalProperties` | `getPortalProperties(javax.servlet.http.HttpServletRequest aRequest)` retrieves the `com.beasys.portal.PortalProperties` out of the request.
`static java.lang.String` | `getRequestURI(javax.servlet.http.HttpServletRequest aRequest)` Retrieves the request URI.
`static java.lang.Object` | `getSessionValue(java.lang.String aName, javax.servlet.http.HttpServletRequest aRequest)` Retrieves a session value.
`static java.lang.String` | `getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)` Retrieves the URI of the `PortalServiceManager`.
`static java.lang.String` | `getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)` Get the working directory specified in the registration.
`static java.lang.String` | `pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)` Get the fully-qualified path of the request URI.
`static void` | `putSessionValue(java.lang.String aName, java.lang.Object aValue, javax.servlet.http.HttpServletRequest aRequest)` Sets a session value.
`static void` | `removeSessionValue(java.lang.String aName, javax.servlet.http.HttpServletRequest aRequest)` Removes a session value.
`static void` | `setAlternateDestination(javax.servlet.http.HttpServletRequest req, java.lang.String dest)` Deprecated. use setOverrideDestination
`static void` | `setLoggedIn(javax.servlet.http.HttpServletRequest aRequest, javax.servlet.http.HttpServletResponse aResponse, boolean aBool)` Sets the logged-in state.
`static void` | `setOverrideDestination(javax.servlet.http.HttpServletRequest req, java.lang.String dest)` Sets the alternate forward variable.
`static void` | `setSessionValue(java.lang.String aName, java.lang.Object aValue, javax.servlet.http.HttpServletRequest aRequest)` Sets a session value.

Methods inherited from class weblogic.servlet.jsp.JspBase
`_jspService, destroy, getServletConfig, getServletInfo, init, jspDestroy, jspInit, service`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### debug

    protected static final boolean debug

  Whether debug mode is on. Facilitates debug output for JSP pages.

### DESTINATION_TAG

    public static final java.lang.String DESTINATION_TAG

  A property name denoting the destination to be used with form submission. A JSP pag typically uses this constants in the following manner: In this example, the destination is set as the current URI, so that the form will post to the page itself.

Constructor Detail

### PortalJspBase

    public PortalJspBase()

Method Detail

### getTrafficURI

    public static java.lang.String getTrafficURI(javax.servlet.http.HttpServletRequest aRequest)

  Retrieves the URI of the `PortalServiceManager`.
  Parameters:
    `aRequest` - the `javax.servlet.http.HttpServletRequest` from which the `PortalServiceManager` is obtained.
  Returns:
    `String` the URI of the `PortalServiceManager`

### getWorkingDirectory

    public static java.lang.String getWorkingDirectory(javax.servlet.http.HttpServletRequest aRequest)

  Get the working directory specified in the registration.
  Parameters:
    `aRequeset` - `javax.servlet.http.HttpServletRequest` from which the `PortalServiceManager` is obtained.
  Returns:
    `String` the value of the working directory of the current portal instantiation

### getDefaultDestination

    public static java.lang.String getDefaultDestination(javax.servlet.http.HttpServletRequest aRequest)

  Get the default destination specified in the registration.
  Parameters:
    `the` - `javax.servlet.http.HttpServletRequest` corresponding to the `PortalServiceManager`
  Returns:
    `String` the default destination of the portal instantiation

### getRequestURI

    public static java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest aRequest)

  Retrieves the request URI. The portal uses it to figure out the current page. According to the JSP 1.0 spec, the requestURI returned from request.getRequestURI may not give you the current page. So to get around it, use this method. It will first look for the "javax.servlet.include.request_uri" attribute. If it is `null` or empty, the request.getRequestURI() method wil be called.
  Parameters:
    `the` - `javax.servlet.http.HttpServletRequest` for which the URI is sought
  Returns:
    the real request URI

### pathFromRequest

    public static java.lang.String pathFromRequest(javax.servlet.http.HttpServletRequest aRequest)

  Get the fully-qualified path of the request URI.
  Parameters:
    `aRequest` - the `javax.servlet.http.HttpServletRequest` for which the fully-qualified path is sought
  Returns:
    `String` the fully qualified path from the request

### createURL

    public static java.lang.String createURL(javax.servlet.http.HttpServletRequest aRequest,
                                             java.lang.String destination,
                                             java.lang.String parameters)

  Creates a portal framework URL from the given request. JSP pages can use this method to ensure that the URLs used for portal navigation are properly applied in various environments ( e.g. cookies on vs. cookies off ).
  Parameters:
    `aRequest` - The `javax.servlet.http.HttpServletRequest` used to create the full URL.
    `destination` - The desried destination. If the destination is not fully qualified (assumed relative), it will query the request to prepend the path. NOTE: do not include a query string in the destination.
    `parameters` - The parameters. These will be appended to the URL.

### fixupRelativeURL

    public static java.lang.String fixupRelativeURL(java.lang.String aURL,
                                                    javax.servlet.http.HttpServletRequest aRequest)

  With the system using jsp:forward the relative directories may not be set employed correctly. Use this method to fixup relative URLs so that they become fully qualified. For example if you are referring to an image in your JSP page as img src="images/dummy.gif", the system may not be able to find it. Change your code to img="<%=fixupRelativeURL("images/dummy.gif")%>. This will ensure that your URL is correct, and not stop you from moving your directory structures around as you wish.
  Parameters:
    `aURL` - the url to fixup.
    `aRequest` - the associated request.
  Returns:
    `String` the fixed-up URL.

### getHomePage

    public static java.lang.String getHomePage(javax.servlet.http.HttpServletRequest aRequest)

  Retrieves the portal home page specified by the start-up parameters for the portal. (usually portal.jsp)
  Parameters:
    `aRequest` - the `http.servlet.http.HttpServletRequest` from which portal information is obtained
  Returns:
    `String` the portal home page

### getPortalPage

    public static java.lang.String getPortalPage(javax.servlet.http.HttpServletRequest aRequest)

  Deprecated. replaced by getHomePage

  Retrieves the portal page specified by the start-up parameters for the portal. (usually portal.jsp)
  Parameters:
    `aRequest` - the `http.servlet.http.HttpServletRequest` from which portal information is obtained
  Returns:
    `String` the portal page

### getCurrentPage

    public static java.lang.String getCurrentPage(javax.servlet.http.HttpServletRequest aRequest)

  Returns the currently active portal page.
  Parameters:
    `aRequest` - the `http.servlet.http.HttpServletRequest` from which portal information is obtained
  Returns:
    `String` the current portal page

### setAlternateDestination

    public static void setAlternateDestination(javax.servlet.http.HttpServletRequest req,
                                               java.lang.String dest)

  Deprecated. use setOverrideDestination

  Sets the alternate forward variable. This value overrides the `DESTINATION_TAG` property upon form submission.
  Parameters:
    `req` - the `javax.servlet.http.HttpServletRequest` associated with the form submission
    `destination` - the JSP page which ultimate processes the request

### setOverrideDestination

    public static void setOverrideDestination(javax.servlet.http.HttpServletRequest req,
                                              java.lang.String dest)

  Sets the alternate forward variable. This value overrides the `DESTINATION_TAG` property upon form submission.
  Parameters:
    `req` - the `javax.servlet.http.HttpServletRequest` associated with the form submission
    `dest` - the JSP page which ultimate processes the request

### setLoggedIn

    public static void setLoggedIn(javax.servlet.http.HttpServletRequest aRequest,
                                   javax.servlet.http.HttpServletResponse aResponse,
                                   boolean aBool)

  Sets the logged-in state. This will also reset the necessary cookie values for a valid session, if the logged-in value is true.
  Parameters:
    `aRequest` - the `javax.servlet.http.HttpServletRequest` used to retrieve the session for update
    `the` - corresponding `javax.servlet.http.HttpServletResponse`
    `aBool` - designates the `true` or `false` logged-in value

### getLoggedIn

    public static boolean getLoggedIn(javax.servlet.http.HttpServletRequest aRequest)

  Indicates whether a user is currently logged into the portal.
  Parameters:
    `the` - portal `javax.servlet.http.HttpServletRequest`
  Returns:
    `boolean` whether a user is logged in

### getSessionValue

    public static java.lang.Object getSessionValue(java.lang.String aName,
                                                   javax.servlet.http.HttpServletRequest aRequest)

  Retrieves a session value. The session value name is 'fixed' up for the current `PortalServiceManager` to avoid naming collisions when multiple `PortalServiceManager` objects share the same session.
  Parameters:
    `aName` - the name of the session property whose value is sought
    `aRequest` - the `javax.servlet.http.HttpServletRequest` from which the session is obtained
  Returns:
    `Object` the new property value

### setSessionValue

    public static void setSessionValue(java.lang.String aName,
                                       java.lang.Object aValue,
                                       javax.servlet.http.HttpServletRequest aRequest)

  Sets a session value. The session value name is 'fixed' up for the current `PortalServiceManager` to avoid naming collisions when multiple `PortalServiceManager` objects share the same session.
  Parameters:
    `aName` - the name of the session property whose value is to be set
    `aValue` - the new property value
    `aRequest` - the `javax.servlet.http.HttpServletRequest` from which the session is obtained

### putSessionValue

    public static void putSessionValue(java.lang.String aName,
                                       java.lang.Object aValue,
                                       javax.servlet.http.HttpServletRequest aRequest)

  Sets a session value. The session value name is 'fixed' up for the current `PortalServiceManager` to avoid naming collisions when multiple `PortalServiceManager` objects share the same session.
  Parameters:
    `aName` - the name of the session property whose value is to be set
    `aValue` - the new property value
    `aRequest` - the `javax.servlet.http.HttpServletRequest` from which the session is obtained

### removeSessionValue

    public static void removeSessionValue(java.lang.String aName,
                                          javax.servlet.http.HttpServletRequest aRequest)

  Removes a session value. The session value name is 'fixed' up for the current `PortalServiceManager` to avoid naming collisions when multiple `PortalServiceManager` objects share the same session.
  Parameters:
    `aName` - the name of the session property to be removed
    `aValue` - the new property value
    `aRequest` - the `javax.servlet.http.HttpServletRequest` from which the session is obtained

### getPortalManager

    public static PortalManager getPortalManager(javax.servlet.http.HttpServletRequest aRequest)
                                          throws java.rmi.RemoteException,
                                                 PortalCreateException,
                                                 PortalException

  Retrieves the `com.beasys.portal.PortalManager` out of the request. If it does not exist in the request, a `PortalManager` will be created.
  Parameters:
    `the` - `javax.servlet.http.HttpServletRequest` from which the `PortalManager` is sought
  Returns:
    the current `PortalManager`

### getPortalProperties

    public static PortalProperties getPortalProperties(javax.servlet.http.HttpServletRequest aRequest)
                                                throws java.rmi.RemoteException,
                                                       PortalCreateException,
                                                       PortalException

  retrieves the `com.beasys.portal.PortalProperties` out of the request. If it does not exist in the request, a `PortalProperties` will be created.
  Parameters:
    `the` - `javax.servlet.http.HttpServletRequest` from which the `PortalProperties` is sought
  Returns:
    the current `PortalProperties`

### cnvrtSC

    public static java.lang.String cnvrtSC(java.lang.String theInpStr)

  Given a string, substitute HTML entities for HTML special characters.
  Parameters:
    `theInpStr` - the string to be converted
  Returns:
    `String` the string with special chars translated

Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 BEA Systems, Inc. All Rights Reserved