Java Platform, Enterprise Edition (Java EE) applications can use Uniform Resource Locators (URLs) by looking up references to logically named URL connection factories through the java:comp/env/url subcontext, which is declared in the application deployment descriptor and mapped to installation specific URL resources.
As in the case of other Java EE resources, this can be done in order to eliminate the need for the application to hard code references to external resources. The process is the same used with other Java EE resources, such as JDBC objects and JavaMail sessions.