I understand a Webservice application consists of the application server, Web server and database server. I have tomcat installed and using oracle as database.(all on the same machine). I am using jee as server technology. So tomcat is my Web server, oracle, my dB server, but what is my application server?
Asked
Active
Viewed 530 times
4
-
4Tomcat is the application server since you can put in it your java application. Tomcat does provide a web server interface, but it is limited. In a real production site, you would put Apache HTTP server in front. So Apache is the web server, tomcat the application server. This allows you to scale Apache or Tomcat based on need. AJP between Apache and Tomcat is used in that case. Apache can also load balance your Tomcat instances. – Nic3500 Apr 16 '18 at 11:48
-
@Nic3500 Tomcat can also do load balancing. Strictly speaking Tomcat is a servlet engine and not a full blown application server (like TomEE). – Kayaman Apr 16 '18 at 11:55
-
@Suraj Rao I read that answer before asking but it did not answer my doubt (query) – tech_logman Apr 16 '18 at 11:57
-
@Nic3500 that answers my query. Thanks. – tech_logman Apr 16 '18 at 11:59
-
@Kayaman: that is right. – Nic3500 Apr 16 '18 at 11:59
-
In the context of the client`s request, I feel like it is. But you are technically correct, Tomcat is no WebSphere or JBoss. – Nic3500 Apr 16 '18 at 12:05
1 Answers
2
Tomcat is the application server because that is where your Java application lives (the back end if you prefer). If it provides the web pages then it is both your web and application server but in the modern world usually that is not the case. In most web services scenario your tomcat will provide some web service end points and the front end of the application (UI) will live on a separate server. That would be the web server and it can be something completely different - not even be java based. Just some UI calling your API.
You can have for example:
Web server running Angular app -> connected to Tomcat which runs your java app -> connected to the oracle

Veselin Davidov
- 7,031
- 1
- 15
- 23
-
-
thanks for the detailed explanation. That helped clear all doubts. – tech_logman Apr 16 '18 at 14:09