[Fixed] angular deployment strategy


Currently we are deploying our angular app in apache server by copying the dist folder.

I am curious to know the difference between deploying as war file vs dist folder and also
the difference of deploying the angular app as war in jboss or tomcat application server instead of deploying that
in web server directly.

I would like to know the pros and cons of these two approaches in terms of performance and security and also I would like to know the industry standard approach for angular deployment.

Any help will be greatly appreciated!!!


Apache HTTP Server , Apache Tomcat and WildFly (formerly JBoss Application Server) are all web servers, so they can server static resources such as your Angular application. The latter two are also servlet containers, while WildFly is a full Java EE/Jakarta EE application server.

The difference would mainly be performance:

  • Apache HTTP Server is written in C, so it will probably be the fastest,
  • Serving the application from a WAR file would be the slowest, since the servlet container needs to uncompress the data. That means uncompressing just the JAR entry, since the offset into the WAR file is usually cached upon deployment.
  • Servlet Containers serving data from an unpacked WAR (Tomcat by default unpacks WARs on deployment) would place second, since Java code is probably slower than C code.

A common deployment configuration is to configure Apache HTTP Server as a reverse proxy for the Servlet Container. In such a configuration you can let Apache serve the static content, while leaving the execution of servlets to the Servlet Container.

See also:

Leave a Reply

(*) Required, Your email will not be published