Is it possible to run Java web application using Nginx server only without tomcat server? Is it possible to run Java web application using Nginx server only without tomcat server? nginx nginx

Is it possible to run Java web application using Nginx server only without tomcat server?


I guess it's not possible since Nginx is not a servlet container.

A servlet container is an application server that implements some version of the Java Servlet Specification.

And this is not the case of Nginx.


nginx has no understanding of what a .war file is as it is not a servlet container. So, answer to your question is No! it is not possible.However, you can configure nginx to act as a reverse proxy in front of a Tomcat server.

Also, this link may help you in details about nginx


If you only use static files and restful services (access by javascript framework) you can try Nginx-Clojureand its sub-project Nginx-Jersey.

If you use servlet/jsp based web application you can try Nginx-Clojureand its sub-project Nginx-Tomcat8 which does not use tomcat as a server but only a servlet package and does use Nginx as the HTTP server.