Tomcat and vagrant: how to get the same result as using war file
<p>I'm trying to create a development environment for Java with the following features:</p>

<ul>
<li>Server on a VirtualBox VM running Tomcat and a MySQL database </li>
<li>Host running Eclipse IDE</li>
<li>Use vagrant to create the server, and automatically sync the source using the /vagrant folder</li>
</ul>

<p>However when I try to use this configuration I end up having 404 error everytime I try to pass the login screen (JSP file), like if it wasn't able to find the servlet. </p>

<p>If I deploy the application with Eclipse (Right-click over project, Export > War file, then go to tomcat manager-gui and import war file) it works like a charm! But if just create a symbolic link to the project WebContent folder, like this:</p>

<pre><code>sudo ln -s /vagrant/myProject/WebContent/ /var/lib/tomcat7/webapps/ProjectFolder
</code></pre>

<p>I just get the login screen and after that an 404 error. I ran a diff against both folders (war import and symbolic link) and got this:</p>

<pre><code>vagrant@vagrant-ubuntu-trusty-64:/var/lib/tomcat7/webapps$ diff -r ProjectFolder teste_final_war_file
diff -r ProjectFolder/META-INF/MANIFEST.MF teste_final_war_file/META-INF/MANIFEST.MF
2c2,4
&lt; Class-Path: 
---
&gt; Built-By: dellcloud2
&gt; Build-Jdk: 1.8.0_77
&gt; Created-By: Maven Integration for Eclipse
Only in teste_final_war_file/META-INF: maven
Only in teste_final_war_file/WEB-INF: classes
Only in teste_final_war_file/WEB-INF/lib: activation-1.1.1.jar
Only in teste_final_war_file/WEB-INF/lib: commons-email-1.4.jar
Only in teste_final_war_file/WEB-INF/lib: commons-fileupload-1.3.1.jar
Only in teste_final_war_file/WEB-INF/lib: commons-io-2.2.jar
Only in teste_final_war_file/WEB-INF/lib: javax.mail-1.5.2.jar
Only in teste_final_war_file/WEB-INF/lib: javax.servlet-api-3.1.0.jar
</code></pre>

<p>How do I get these files on the synced folder method? They don't show up when I run "Run as" on Eclipse and seem to be packed only on the war file when I create it.</p>

<p>Any other way to achieve what I'm trying?</p>