I have a web app that current uses an external directory to host static files, e.g css, velocity, in a Spring webapp. That is, the directory is inside tomcat’s webapp directory but not inside the WAR.
Other than the ability to easily edit these resources without needing to recompile-package-deploy is there any advantage to not including these files inside the war.
I seem to recall being told A LONG TIME AGO that Tomcat had poor performance in serving files static files, but I don’t have any experience that backs this up. As far as I’m aware the only advantage is that of ease of editing.
In general the web server in front of application server pattern is still valid:
No question, depending on your use case it may look different:
Having web server and application server on the same nodes reduces the advantages of providing a web server. My experience is that when it comes to ‘smaller’ internal applications used by ‘a few users’ a web server is not necessary and tomcat serves well. This is especially true if your app only serves some static files like icons, css and javascript.
Hope this helps…