Environment Configuration Settings

Before you can build and run the samples in this tutorial, you need to complete the following tasks:

Setting the Web Container Listener Port

The Java code and configuration files for the examples used in this tutorial assume that the web container is listening on IP port 8080. Port 8080 is the default listener port for both GlassFish (domain1) and Tomcat. If you have changed the port, you must update the port number in the following files before building and running the examples:

Setting the Web Container Home Directory

Before building and deploying the web service and its client, the home directory of the web container must be set as an environment variable.

When you are running from the command-line, you should set the appropriate environment variable to the web container's top-level installation directory. This way, you will not have to manually set the environment variable each time you open a new command window. For GlassFish, the AS_HOME environment variable should be set to the top-level directory of GlassFish, for example, on Windows: C:/Sun/glassfish. For Apache Tomcat, set the CATALINA_HOME environment variable to the Tomcat top-level directory.