Servlet Configuration  «Prev  Next»

Lesson 7Installing the Java Web Server
ObjectiveDownload and install Tomcat

Installing Tomcat Server

Download Tomcat Java Server by clicking on the following link.
Download Tomcat
Use Tomcat for Windows, Linux, or Mac OS X.
Download Tomcat 9
Make sure you have plenty of memory as described in the section below.

Tomcat Memory and Mib

The mebibyte is a multiple of the unit byte for digital information. The binary prefix mebi means 220, therefore one mebibyte is equal to 1048576bytes.
Tomcat 7/8 itself can run in about 12MiB of heap. Tomcat 7.0.35 takes up exactly 13412390 bytes on your disk with no applications installed and no log files. If you do not install any web applications or write any log files, Tomcat requires 13MiB of disk space. The processor requirements are all dependent upon the Java Virtual Machine.
Recommended system configuration:
  1. Max cores,
  2. Max memory, and
  3. Max disk space.
I have seen web applications that run extremely well under expected load on a single core with 512MiB of memory installed and minimal disk usage. On the other hand, I have seen multi-core machines with 32GiB of memory fall-over because of improper configuration, unstructured software and inadequate capacity-planning.
Pay attention to those directories that are relevant to the study of servlets. The four you should know about are
  1. bin,
  2. conf,
  3. lib,
  4. webapps, and
  5. work.


  1. bin is where executable files are kept, including the server program itself.
  2. public_html is where the server looks for HTML documents. If you installed the Java Web Server into C:\JWS, and you enter a URL such as
    http://localhost:8080/index.html
    
    into a Web browser, it will serve out the file C:\JWS\public_html\index.html
    If you installed Tomcat Server into C:\Program Files (x86)\Apache Software Foundation\Tomcat8.0\webapps
    and you enter a URL such as http://localhost:8080/index.jsp into a Web browser, the Java Server Pages (JSP Files) can be maintained in the webapps directory.
  3. servlets is where servlets are kept.
  4. system is a rich source of documentation. The files under system\doc are ordinary HTML and can be read in your browser whether the Web server is running or not.
In the next lesson, you will learn how to start, stop, and administer the Java Web Server.

Installing Webserver - Exercise

Download and install the Java Web Server.
Installing Webserver - Exercise