So I was given a WAR 'file', but upon downloading it I noticed that it is actually a folder, not a WAR file. Trying to open this folder in Netbeans is not working, because it is expecting a war file, not a folder.
I attempted "War-ing" the folder, which worked. Netbeans can now open the file, however none of the files can be edited.
This was tested using apache's ode.war in NetBeans 8.0:
If you don't have eclipse handy, just place the war file into the webapps
folder of Tomcat, go to the bin
folder of Tomcat and run startup
. Tomcat will automatically extract the war file for you. Now go to the webapps
folder and you'll find another folder there, with the same name as your war.
I couldn't find an option to import a war directly into Netbeans (strange. Perhaps someone could create this feature and submit it as a patch to Netbeans). The folder which gets extracted into the Tomcat folder can be used as the Netbeans project. It's advisable to copy it to some other folder first. Import by File > New Project > Web application with existing sources
.
Eclipse has an option to export a war and include the sources with it too, so there's a chance that the source files are in the war too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With