Start of Content Area

Background documentation Application Alias  Locate the document in its SAP Library structure

An application alias is an alternative name for a J2EE Web application running on the J2EE Engine. Each Web application has its own root as defined by the Java Servlet Specification version 2.3. It is also referred to as context path. The context path of a Web application is mapped to a URL pattern. Server users utilize this URL pattern to access the resources of a particular Web application. The application alias actually represents the URL pattern that is mapped to a certain application’s context path. For example, the default Web application for the default virtual host of the J2EE Engine is mapped to the “/“ URL pattern. Therefore, when you request the default host, the server displays the index.html page, which is part of the default application.

Application Alias vs. HTTP Alias

Application alias differs from HTTP Alias in that it points to a Web application, not a physical directory on the server’s local file system. There is a difference in the way you set application aliases, too. You cannot do it at runtime using any of the administration tools provided. Instead, the URL mapping to a Web application is defined prior to deploying the application. It is specified in the application’s deployment descriptor.

Recommendation

We recommend that you do not define the same string for an HTTP alias and the application alias or an HTTP alias beginning with the same string as the application alias, for example HTTP alias /string1/string2 and application alias /string1.

However, you do have control over the availability of each Web application on different virtual hosts. If you want a specific application be unavailable on a particular host, you can remove the application alias from the list of application aliases on this host. By default, when a J2EE Web application is deployed on the J2EE Engine, it is available on each of its virtual hosts.

For more information on how to add or remove application aliases on a virtual host, see Activating and Deactivating Application Aliases.

Using Application Aliases

Here is a small example of accessing a J2EE Web application that is deployed and running on a particular virtual host. Assume the host name is www.myhost.com, the application alias carrental is mapped to the car rental application. Then, if you enter the www.myhost.com/carrental/ URL in the address bar of your browser, the welcome page of the car rental application is displayed.

 

 

End of Content Area