定义SAP Portal Url别名

Defining URL Aliases

Use

A URL alias is the part of the portal URL after the section that specifies the portal J2EE application ( irj ), which by default ishttp://<server>:<port>/irj .

This section describes how to define custom URL aliases in the URL Alias Manager for your own portal usage scenarios. This is the recommended method for defining URL aliases. However, you can also define URL aliases in the web.xml file.

Procedure

Defining URL Aliases

  1. In the portal, navigate to System Administration  System Configuration  Portal Display  URL Alias Manager.
  2. In the URL Aliases list, choose New .

A new URL alias is added to the URL Aliases list.

  1. In the Properties of New alias area, enter a name and an optional description for the URL alias.

The URL alias name must be unique.

  1. Select any of the following system properties that you want to apply to the alias, to indicate the type of portal access to provide for users accessing the portal with this alias:
  • Whether the portal can be accessed by anonymous users
  • Whether the portal can be accessed via a proxy server
  • Whether the portal can be accessed via a low-bandwidth connection
  • Whether the alias is included in the URL returned to the client
  • Whether the portal application name ( irj ) is included in the URL returned to the client
  1. Define any custom properties that you require:
  2. Choose Add custom property .
  3. Enter a name and value for the property and choose Save .

Note

You can remove a custom property that is no longer needed by choosing Remove property next to the relevant custom property.

  1. Choose Save .

The properties of the new URL alias are updated in the URL Aliases list.

 

 

 

 

 

Defining URL Aliases in the Web.xml File

Use

A URL alias is the part of the portal URL after the section that specifies the portal J2EE application ( irj ), which by default ishttp://<server>:<port>/irj .

This section describes how to define URL aliases in the web.xml file for your own portal usage scenarios. However, the preferred way to define URL aliases is using the URL Alias Manager. For more information, see Defining URL Aliases .

Procedure

  1. Locate the com.sap.portal.runtime.dispatcher.war file in\usr\sap\ <SID> \ <instance ID> \j2ee\cluster\apps\sap.com\irj\servlet_jsp\irj.
  2. Extract the web.xml file.
  3. Add an initial parameter ( <init-param> element) for the gateway servlet.
  4. Define the parameter name ( <param-name> element) as the new URL alias. The URL alias name must be unique.
  5. Set the parameter value ( <param-value> element) to a string of key-value pairs, separated by commas (,). All values are either 0(false) or 1 (true).

The following keys are available:

Key

Description

anonymous

Indicates whether anonymous user access is enabled

low_bandwidth

Indicates whether users are accessing the portal via low-bandwidth connections

proxy

Indicates whether users can access the portal via a proxy server

include_in_url

Indicates whether the alias is part of the URL returned to the client

include_application_name_in_url

Indicates whether the portal application name ( irj ) is part of the URL returned to the client

The following is a sample parameter value:

anonymous=<value>,proxy=<value>,low_bandwidth=<value>, include_in_url=1, include_application_name in_url =1

  1. Add the updated web.xml file to the .war file.
  2. Locate the com.sap.portal.runtime.dispatcher.ear file. This file is part of the com.sap.portal.runtime.dispatcher.sda file located in the EP-Basis SCA.

Make a copy of the .ear file.

  1. Insert the .war file into com.sap.portal.runtime.dispatcher.ear , overwriting the existing .war file.
  2. Deploy the modified .ear file on the server.
  3. Restart the portal.

The following shows the XML that is added to create a new URL alias called myAlias :

<servlet>
  <servlet-name>gateway</servlet-name>
  <servlet-class>com.sap.portal.navigation.Gateway</servlet-class>
  <load-on-startup>0</load-on-startup>
  .
  .
  .
  <init-param>
    <param-name>myAlias</param-name>
    <param-value>anonymous=0,proxy=0,low_bandwidth=0,include_in_url=1,include_application_name_in_url=1
    </param-value>
  </init-param>
  .
  .
  .
</servlet>
         

 

posted @ 2019-05-17 10:18  宁海峰  阅读(623)  评论(0编辑  收藏  举报