Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

J2EE: How can i deploy a .war file to the tomcat webapps directory using netbeans?

user-image
Question ajoutée par Arslan Siddiqui , Java Team Lead , Wiztech
Date de publication: 2015/04/22
Phu Le
par Phu Le , Senior Developer , FPT Software

  1. Create a Java Web Project using Netbeans.
  2. Click on the Projects tab, or press Ctrl+1.
  3. Right-click on the project's name and click on build.
  4. Click on Files, or press Ctrl+2, to navigate to the File structure of the project.
  5. Expand the project node by double-clicking on the project's name.
  6. Right-click on build.xml.
  7. Select Run Target.
  • On Run Target's sub menu, click on dist.
The Output panel will show the path in which the WAR file is placed. Deploying the WAR file
  • Copy the WAR file and paste in the the webapps folder of your apache tomcat installation (may be‘C:\\apache-tomcat-6.0.32\\webapps’) folder
  • Then start the tomcat server by double clicking startup.bat file of your apache tomcat installation (may be‘C:\\apache-tomcat-6.0.32\\bin\\startup.bat’)
  • This will deploy and redeploy the all WAR files inside  the webapps folder
If the deployment is successful, when you run the project it will display the “Hello World” output (when you enter following URL)

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?