Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a war file of my project in NetBeans?

Tags:

java

jsp

netbeans

How can I create a war file of my project in NetBeans?

like image 447
user93796 Avatar asked Jun 17 '09 14:06

user93796


People also ask

Where is WAR file in NetBeans?

In Netbeans 7.4 - right click on the project select Properties-> Build -> Packaging. There you will see Compress WAR File.

How do I create a WAR file?

You need to use -c switch of jar, to create the war file. Go inside the project directory of your project (outside the WEB-INF), then write the following command: jar -cvf projectname. war *

How do I open a WAR file in NetBeans?

To deploy a WAR with NetBeans IDE, do the following: Select File->Open Project. In the Open Project dialog, navigate to your project and open it. In the Projects tab, right-click the project and select Undeploy and Deploy.


2 Answers

It's possible that you already have a war file and don't know it - netbeans does most of the work for you and I believe it creates a distributable war file by default. If you created a web project and successfully built it, it will be in the "dist" directory off your project root.

like image 142
steve Avatar answered Oct 05 '22 17:10

steve


As DPA says, the easiest way to generate a war file of your project is through the IDE. Open the Files tab from your left hand panel, right click on the build.xml file and tell it what type of ant target you want to run.

NetBeans - Create a WAR file

like image 32
Salvador Valencia Avatar answered Oct 05 '22 17:10

Salvador Valencia