Deploy a Web Application to a tc Server Runtime Instance

In this procedure you deploy a new Web application to a tc Runtime instance, then stop and start it. It is assumed that you already have a Web application WAR file to deploy. If you do not, see Tutorial: Very Simple Web Application Development for a tutorial that shows you how to create a very simple HelloWorld Web application and package it into a WAR file.

It is also assumed that you have already browsed to the tc Runtime instance to which you want to deploy, as described in Restart a tc Runtime Instance.

  1. Click the Views > Application Management tab. You use this page to deploy and manage tc Runtime applications.

  2. If the Web application you want to deploy is physically located on the same computer from which you are running your browser, go to the Deploy Application from Local Machine section. If the Web application is actually located on the computer on which the tc Runtime instance is running, then go to the Deploy Application from Server Machine section. If you are running your browser on the same computer as tc Runtime, then you can go to either section. A typical remote machine use case is machines that use network mounted drives to which they have access.

    Enter the location of the Web application in the corresponding field. Use the Browse button to find a local Web application WAR file; you must already know the full pathname of the WAR file if you are deploying it from the tc Runtime computer. If you are deploying from a remote machine, your local machine must have access to the remote directory that contains the Web application file.

    The following graphic shows deploying from a local computer

  3. Enter hello in the Context path field.

    Optionally, check the Use cold deployment strategy if you want the tc Runtime instance to shutdown, deploy the application, and then start up again. By default (if box is unchecked), the tc Runtime instance hot-deploys the application, which means it does not shutdown then restart but simply deploys the application while the instance is still running. Use the cold deployment strategy if you want to avoid common hot deployment errors, such as running out of PermGen space. The PermGen space holds the metadata about classes that have been loaded/created in the JVM.

  4. Click Upload and deploy (for a local WAR file) or Deploy (for deploying a WAR file on the tc Runtime computer). Hyperic deploys the WAR file to the current tc Runtime instance. You should see the Web application listed in the Deployed Applications table.

  5. You can start, stop, reload, and undeploy a deployed Web application by selecting it in the Deployed Applications table and clicking the corresponding button.

To invoke the Web application you just deployed, enter the following URL in a browser:

http://host:port/hello

where:

For example:
http://localhost:8080/hello
You can get the host and port information of a tc Runtime instance by looking at its HTTP connector configuration from the Views > Server Configuration > Services tab.