Since Tomcat just unzips the EAR WAR to the filesystem to serve the app, what is the benefit of using an EAR WAR and what are the drawbacks to just pushing a filesystem to the Tomcat webapps filesystem?
Since Tomcat just unzips the EAR WAR to the filesystem to serve the app, what is the benefit of using an EAR WAR and what are the drawbacks to just pushing a filesystem to the Tomcat webapps filesystem?
Tomcat supports WAR but not EAR. Anyways , I think your question is about why we normally deploy the application that is packaged as a single WAR rather than the exploded WAR (i.e exploded deployment).
The main advantages for me are :
It is more easy to handle the deployment when you just need to deploy one file versus deploying many files in the exploded WAR deployment.
Because there is only one file get deployed , we can always make sure the application is running in a particular version. If we allow to deploy individual files and someone just update several files to other version , it is difficult to tell what is the exact version that the application is running.
There are already some discussion about such topics before , you can refer this and this for more information.
EAR (Enterprise Application aRchive) is not supported by Tomcat (web container).
As you have written Tomcat I guess you are asking about WAR and extracted/exploded WAR.
I see some benefits, if you deploy a single war-file
Your question is a bit ambiguous and unclear to me, as it's hard to understand what you try to clarify; however, let's take your points one by one.
Since Tomcat just unzips the EAR to the filesystem to serve the app..
Tomcat can not explode and deploy EAR files, because it does not implement entirety of Jakarta (formerly - Java) EE specification; EAR, however, is an "Enterprise Archive", i.e. an Enterprise Java Application archive, which doesn't fit into subspecifications only.
Rather, Tomcat is a Web Server (often referred as Servlet Container, Servlet Engine, Web Container), which implements:
and all these are sub-specifications of Java/Jakarta EE.
what is the benefit of using an EAR?
EAR is a fully-blown Enterprise (Application) Archive, which brings much more, that just Servlet, JSP, and etc.
what are the drawbacks to just pushing a filesystem to the Tomcat webapps filesystem?
Nothing, generally speaking. webapps is a default folder where Tomcat will usually try to look for a web applications, that are expected to be .war files.