Issue
In NetBeans 8.1 I created a new project of the kind "Web Application with Existing Sources". I deleted context.xml in META-INF because I don't want it there (I have my reasons). But whenever I restart NetBeans or just close and reopen the project, NetBeans generates the context.xml file again. Is there any way to avoid it? I've tried to search but without any success. Thanks for help!
Solution
I found if I edited the Project Properties for the project, and removed 'Tomcat' from the selected "Server" field under the "Run" tab, netbeans stopped creating context.xml.
I may have also removed this line manually from nb-configuration.xml:
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>Tomcat</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
I'm not sure if that's necessary or not though, my guess is it's not, but feel free to experiment and comment below or edit this answer if you figure it out.
Answered By - zbateson
Answer Checked By - Marie Seifert (JavaFixing Admin)