Just create a web application project in Netbeans for your final project.
This will allow you to create war files/etc.
You'll need to adjust the war file to work outside netbeans' Tomcat.
Just add the following to the build.xml:
<target name="-post-dist"> <mkdir dir="${dist.dir}/deploy/tmp"/> <unjar src="${dist.war}" dest="${dist.dir}/deploy/tmp"/> <delete file="${dist.dir}/deploy/tmp/META-INF/context.xml"/> <copy file="${web.docbase.dir}/META-INF/context.xml" todir="${dist.dir}/deploy/tmp/META-INF"/> <jar basedir="${dist.dir}/deploy/tmp" destfile="${dist.dir}/deploy/${war.name}" includes="**"/> <delete dir="${dist.dir}/deploy/tmp"/> </target>
This creates the same war file in a 'deploy' sub-directory which can be used outside of netbeans.