定义SAP Portal Url别名

本文档详细介绍了如何在SAP Portal中定义URL别名,包括在URL Alias Manager中创建别名的步骤和在web.xml文件中定义别名的方法。通过URL别名,可以自定义门户访问路径,设置匿名访问、代理服务器、低带宽连接等属性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值