|
|
abukta
super admin
profile |
|
Join Date: 29 Mar 2005 21:03
Posts: |
|
|
Creating and Deploying a WAR File |
When your web application is ready for deployment, you need to package it for distribution. As we discussed previously in Java Web Applications, web applications are packaged in WAR files. The steps required to "WAR-up" your /onjava web application and deploy it are as follows:
Change to the root directory of your web application. In this case the root directory would be TOMCAT_HOME/webapps/onjava/.
Archive the web application:
jar cvf onjava.war .Copy the resulting WAR file, onjava.war, to the TOMCAT_HOME/webapps directory.
If you're deploying this WAR file to the Tomcat installation that you were developing in, then you will need to back up your development directory and remove it from the TOMCAT_HOME/webapps directory.
Add a new Context entry to the /TOMCAT_HOME/conf/server.xml file, referencing the onjava web application.
Restart Tomcat.
That's it. Your application should now be deployed and running. If it isn't, check your entry in the TOMCAT_HOME/conf/server.xml file to ensure that you have set the appropriate values.
message edited by abukta (20 Jun 2006 11:50)
|