File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Is Tomcat an Application Server or Webserver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is Tomcat an Application Server or Webserver" Watch "Is Tomcat an Application Server or Webserver" New topic

Is Tomcat an Application Server or Webserver

sai prasanna
Ranch Hand

Joined: May 02, 2005
Posts: 167
Hi all
Is Tomcat an Application Server or Webserver what is the main difference
between them please explain?

Thanks in advance
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

The short answer is "Both".

Tomcat is a servlet container that can also be run as a standalone webserver.

The distinctions between these terms is a bit blurry but here is
a rough description.
  • Appserver: Java term for an application that runs J2EE applications.

  • This includes EJB, Servlets, JNDI, JSP, and more..
  • Servlet Container: The part of an appserver that handles Servlets (most have JSP compilers built in With some, you have to pay more for this).
  • Webserver: An application running on a machine that handles HTTP requests.

  • Originally, these only handled static files and maybe CGI scripts.

    Tomcat can either be bound to an external webserver (such as Apache HTTPD or Microsoft IIS) but can also run as a stand-alone Webserver/Servlet container/JSP engine. It can also be embedded into a full Appserver such as JBoss.

    Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
    Jaime M. Tovar
    Ranch Hand

    Joined: Mar 28, 2005
    Posts: 133
    I think it only qualifies as a web container. Here you can find more info about a web container. Web Container

    [Bear edit: fixed gnarly formatting issues]
    [ December 04, 2005: Message edited by: Bear Bibeault ]

    She will remember your heart when men are fairy tales in books written by rabbits.<br /> As long as there is duct tape... there is also hope.
    Bear Bibeault
    Author and ninkuma

    Joined: Jan 10, 2002
    Posts: 63862

    You can certainly call it a web container. But that doesn't mean you cannot call it anything else; the terms are not precisely defined.

    [Asking smart questions] [About Bear] [Books by Bear]
    I agree. Here's the link:
    subject: Is Tomcat an Application Server or Webserver
    It's not a secret anymore!