• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Webserver Vs Application Server

 
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, In general, WebServer is used for Static content like HTML, images etc..And Application Server is used for enterprise services like EJB, JAXB, JMS etc..

Question 1: Do we keep Servlet and/or JSP files in WebServer or Application Server.
Question 2: Do we deploy.war file in WebServer and .ear file in Application Server ? If so, How do they communicate ?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no real definitive definition for what these terms mean. As this is a subject that has been previously discussed many times, I recommend that you search for the previous conversations on this topic.
 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wont call JAXB an enterprise service and JMS can be used without an application server.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Either
2) If you are deploying to an app server, everything gets deployed as an ear. The app server runs in multiple containers if needed.
 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for JSP and Servlet it must required a Servlet container like tomcat. Web Server is only to receive the request from the client through httpd and webserver core used to communicate to different modules for further process of the request. here tomcat is a mudule/container which is responsible for handling to the servlet/jsp type of request.

An Application server has inbuild all those thing with a webserver.So if you send a servlet request to a webserver which does not have any servlet container then your request will be fail. example Apache webserver and Apache Tomcat is two different type server , in Apache Tomcat has both web server and servlet container where as in Apache webserver has not any Tomcat OR servlet container. In this case you need to configure Tomcat with Apache webserver externally.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Question 1: Do we keep Servlet and/or JSP files in WebServer or Application Server
Application container has seperate Web and application container within. We usually keep Servlet / JSP in web container part of Application Server.
Many a times, we keep html and static images/files on Apache Server. Apache Server will pass the request to Application container if it si for dynamic content like jsp/servlet.

Question 2: Do we deploy.war file in WebServer and .ear file in Application Server ? If so, How do they communicate ?
We usually bundle our application as EAR if this has some application container component like ejb in it.
In that case, EAR contains, EJB jar / other files and JSP/Servlet WAR. All my WAR related stuff gets deployed on web server and EJB related stuff on Application container. If it is requeired to have communication between Web Server to Application Server, we shall need to call those services explicitly.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

bharat b narang wrote:Question 1: Do we keep Servlet and/or JSP files in WebServer or Application Server
Application container has seperate Web and application container within. We usually keep Servlet / JSP in web container part of Application Server.
Many a times, we keep html and static images/files on Apache Server. Apache Server will pass the request to Application container if it si for dynamic content like jsp/servlet.


Again, it all depends upon the definition of these terms, for which there is no definitive definitions.

While Tomcat (or other servlet containers) can be fronted with a static web server such as Apache, this is not necessary unless there's something that is needed from Apache that can't be done by Tomcat.

Question 2: Do we deploy.war file in WebServer and .ear file in Application Server ? If so, How do they communicate ?
We usually bundle our application as EAR if this has some application container component like ejb in it.
In that case, EAR contains, EJB jar / other files and JSP/Servlet WAR. All my WAR related stuff gets deployed on web server and EJB related stuff on Application container. If it is requeired to have communication between Web Server to Application Server, we shall need to call those services explicitly.


Again, subject to definition. Is Tomcat an application server or a web server? Is it both? Saying something like ear == app server, and war == web server isn't accurate. What would Apache Web Server, clearly a web server, do with a war file?
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a easy language

Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web applications

Application server can execute Enterprise application, i,e (servlets, jsps, and EJBs) it is having two containers

1. Web Container(for interpreting/executing servlets and jsps)
2. EJB container(for executing EJBs). it can perform operations like load balancing , transaction demarcation etc etc
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

shiva pandey wrote:
Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web applications


That doesn't work. This definition means that Apache Web Server, and IIS, are not web servers. Really?

As I said, this has been debated before and without resolution. And we can come up with whatever definitions we want here, but it won't make any difference outside of this topic.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic