Display rules can be based on the portal alias of the URL that was entered into the browser to access the portal.
A portal alias is the part of the URL after the section that specifies the portal J2EE application (irj), which by default is http://<server>:<port>/irj. Standard portal aliases are defined in the portal’s J2EE deployment descriptor (web.xml) for specific use cases or scenarios.
If a user specifies an undefined alias, it is ignored.
The following is the format for a portal URL (where /<quick link> is optional):
http://<hostname>:<port>/irj/<alias>/<quick link>
For example, the portal alias for displaying the light framework page is portal/light, so the URL for accessing the portal with the light framework page is:
http://<hostname>:<port>/irj/portal/light
For information on incorporating portal URL aliases in a rule collection, see Defining Portal Display Rules.
You can define custom portal aliases for your own scenarios.
In addition to its use in display rules, a portal alias automatically sets system properties, which indicate the type of portal access to provide for URLs with this alias, including:
● Whether the user is anonymous.
● Whether the user is accessing to the portal via a low-bandwidth connection.
● Whether the user is allowed to access the portal via a proxy server.
● Whether the alias is part of the URL returned to the client.
● Whether the portal application name (irj) is part of the URL returned to the client.
To define an alias:
...
1. In web.xml for the irj J2EE application, add an initial parameter (<init-param> element) for the gateway servlet.
2. Set the parameter name (<param-name> element) to the new portal alias.
3. 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 access is enabled. |
proxy |
Indicates whether users can access the portal via a proxy server. |
low_bandwidth |
Indicates whether users are accessing the portal via low-bandwidth connections. |
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
4. Restart the portal.
The following shows, in bold, the XML added to create a new alias 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>
We recommend that you set the PortalAlias cookie to be delivered in secure mode to fulfill all security standards. This indicates to the browser whether the cookie should only be sent using a secure protocol, such as HTTPS or SSL.
...
1. Go to System Administration → System Configuration → Service Configuration.
2. In the Portal Catalog, open Applications → com.sap.portal.navigation.AliasService → Services.
3. Right-click AliasService and choose Configure.
4.
Set the
portal.alias.security.enforce_secure_cookie property to
true.
This marks the logon ticket as a secure cookie, to enforce that the client
browser sends the cookie only when an SSL connection to the J2EE Engine or the
reverse proxy is established.
The default value is false.
5. Choose Save.
6. Restart the service.