A URL alias is the part of the portal URL after the section that specifies the portal J2EE application ( irj ), which by default is http://<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 .
For information about URL aliases and the different options for defining them, see Understanding URL Aliases .
Changes that you make to the web.xml file are overwritten when you upgrade your portal to a new release or support package stack. For this reason, we recommend that you define URL aliases in the URL Alias Manager in the portal, and not in the web.xml file.
We recommend that you set the portal alias cookie to be delivered in secure mode to meet all security standards. For more information, see Securing the Portal Alias Cookie .
Locate the com.sap.portal.runtime.dispatcher.war file in \usr\sap\ <SID> \ <instance ID> \j2ee\cluster\apps\sap.com\irj\servlet_jsp\irj.
Extract the web.xml file.
Add an initial parameter ( <init-param> element) for the gateway servlet.
Define the parameter name ( <param-name> element) as the new URL alias. The URL alias name must be unique.
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
Add the updated web.xml file to the .war file.
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.
Insert the .war file into com.sap.portal.runtime.dispatcher.ear , overwriting the existing .war file.
Deploy the modified .ear file on the server.
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>