tags:

views:

3658

answers:

3

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

+1  A: 

Netbeans has an export to war function if you right click, but you are really better off creating an ant build script.

stevedbrown
where to right click ? can u explaing how to do it this way. i dont want to use ant builder
+1  A: 

Netbeans will create the Ant script for you, it uses Ant to build anyway. But if you want to get the war file, just build your project. The .war file will be located in /yournetbeanshomedirectory/yourproject/dist/yourwar.war

You can check out the ant build script it uses by looking at the build.xml file in your project directory. Might help you feel a little more comfortable using ant to do builds.

DMMcKinnon
+1  A: 

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.

steve
thanks man bye
Did that answer work for you?
steve