2
Most read
7
Most read
15
Most read
Apache Tomcat
(Version 6.0)
Presented by
Venkat pinagadi

NJIT
1
What is Apache Tomcat?








2

Apache is the most common HTTP Web Server on the
Internet. It is the Web server used at http://web.njit.edu
The Tomcat server is a Java-based Web Application
container which is used to run Servlet and Java Server
Pages (JSP) Web applications.
Tomcat has become the reference implementation for
both the Java Servlets and Java Server Pages
specifications.
Tomcat was chosen to be the official Sun Web
Component (JSP/Servlet ) Container Reference
Implementation.
What is Apache Tomcat? [Contd.]




3

Apache Tomcat is used to serve Java Servlets and Java
Server Pages. It's a complex piece of software and
though the documentation is very comprehensive, it
helps to have a good reference work to hand.
It is an open source Java Servlet application server used
to deploy Java applications after they are built with JSP
and Servlets. It can be used as a stand-alone product or
it can be integrated with the Apache server.
What is a container?


Containers are the interface between a component and
the low-level platform-specific functionality that supports
the component.



Before a Web, enterprise bean, or application client
component can be executed, it must be assembled into
a J2EE module and deployed into its container.

4
J2EE Containers (Server)






5

J2EE server :
The runtime portion of a J2EE product. A J2EE server
provides EJB and Web containers.
Enterprise JavaBeans (EJB) container :
Manages the execution of enterprise beans for J2EE
applications. Enterprise beans and their container run on the
J2EE server.
Web container :
Manages the execution of JSP page and servlet
components for J2EE applications. Web components and
their container run on the J2EE server.
J2EE Containers (Client)




6

Application client container :
Manages the execution of application client components.
Application clients and their container run on the client.
Applet container :
Manages the execution of applets. Consists of a Web
browser and Java Plug-in running on the client together.
J2EE Server and Containers
Client
Browser

Web Server (Apache)

Servlet

JSP page

Tomcat

Java Web Container
Application
Client
Client
Container
Client Machine

7

Database
Session
Entity
Bean
Bean
EJB Container

JBoss,
WebSphere,
WebLogic, etc
Working environments




8

Java is already installed on PCs in the
NJIT PC labs and the Solaris and Linux
labs on the second floor of GITC. Tomcat
is also installed on the Solaris machines. It
is recommended that all work with Tomcat
be done on AFS31 through AFS35.
The installation guides on the following
slides are for your own computers.
Initial Setup




9

The Java Software Development Kit (JDK) is aimed
at Java developers. It consists of Sun's Java
Runtime Environment bundled with programming
tools. Java Runtime Environment (JRE) is the
software required to run any application deployed on
Java platform.
Download J2SE Runtime Environment
Install the JRE according to the instructions included
with the release.
Installation of Apache Tomcat
Initiate the download of Tomcat from the site
http://tomcat.apache.org/
 View the corresponding documentation
and setup for help in running on various
platform and requirements.
 After downloading follow the instructions
to start installation.
10
Start Up Tomcat




11

Tomcat can be started by executing the following
commands:
$CATALINA_HOMEbinstartup.bat
(Windows)
$CATALINA_HOME/bin/startup.sh
(Unix)
After startup, the default web applications included with
Tomcat will be available by visiting:
http://localhost:8080/
Link Details
http://localhost:8080/myapp/chapter01/sample00.html

Server is local

protocol is http

12

Can OMIT if using
ROOT as default

Listens on port 8080

Path to file
Shut Down Tomcat


13

Tomcat can be shut down by executing the following
command:
$CATALINA_HOMEbinshutdown
(Windows)
$CATALINA_HOME/bin/shutdown.sh (Unix)
Enabling SSI and CGI
support
SSI and CGI are disabled by default for
security reasons to enable them:
 To enable and configure CGI support,
please see the cgi-howto.html page.
 To enable and configue SSI support,
please see the ssi-howto.html page.

14
Security Managers URL
In order to grant security permissions to JARs
located inside the web application repository,
use URLs of of the following format in your
policy file:
file:${catalina.home}/webapps/examples/WEBINF/lib/driver.jar

15
Enabling invoker servlet:
(NJIT is non-standard)






16

Starting with Tomcat 4.1.12, the invoker servlet is no longer
available by default in all webapps. Enabling it for all webapps is
possible by editing $CATALINA_HOME/conf/web.xml to uncomment
the "/servlet/*" servlet-mapping definition.
Using the invoker servlet in a production environment is not
recommended and is unsupported. More details are available on
the Tomcat FAQ at
http://tomcat.apache.org/faq/misc.html#invoker.
WARNING! On NJIT Systems, the invoker “servlet” is in use, and
needs to be maintained if you edit your web.xml. A URL must be in
the form http://web.njit.edu/~<ucid>/servlet/<classname> for the
servlet to be found and executed by Tomcat.
UCS at NJIT







17

Apache Tomcat is installed on UCS and
servlets can be run after configuration of your
account.
Basic information will be available from link:
http://web.njit.edu/all_topics/Servers/Tomcat/
Changes to servlets are seen immediately. The
first time you set up Tomcat, servlets are visible
only after the NJIT server is restarted which is
done once a day at 6:00 AM.
As of 03/2008 Apache is running on afs31-afs35.
Any other web server using
port 8080
This happens usually when any other web server (or any

process) has laid claim to port 8080 and this one is the
default HTTP port that Tomcat attempts to bind to at
startup. So for changing this, open the file:
$CATALINA_HOME/conf/server.xml
and search for '8080'. Change it to a port that isn't in use,
and is greater than 1024, as ports less than or equal
1024 require superuser (root) access to bind under UNIX.
Restart Tomcat. Be sure that you replace the "8080“ in
the URL you're using to access Tomcat. If you change
the port to 1977, you would request the URL
http://localhost:1977/ in your browser.

18
Out of environment space error


An "out of environment space" error
This happens when running the batch files in
Windows 95, 98, or ME operating systems. Right-click
on the STARTUP.BAT and SHUTDOWN.BAT files.
Click on "Properties", then on the "Memory" tab. For
the "Initial environment" field, enter in something like
4096. After you click apply, Windows will create
shortcuts which you can use to start and stop the
container.

19
The 'localhost' machine isn't
found error


The 'localhost' machine isn't found.
This could happen if you're behind a proxy. If that's
the case, make sure the proxy configuration for your
browser knows that you shouldn't be going through
the proxy to access the "localhost". In Netscape, this
is under Edit/Preferences -> Advanced/Proxies, and
in Internet Explorer, Tools -> Internet Options ->
Connections -> LAN Settings.

20
Apache Tomcat Updates


21

The latest version of Apache Tomcat
changes regularly so keep updated by
visiting the link :
http://tomcat.apache.org/
Advantages of Tomcat









22

1) It is an open source application server
2) It is a light weight server (no EJB)
3) It is easily configured with apache and IIS
4) Very stable on Unix systems
5) Good documentation online
6) Java Sun compliant
7) Does not require a lot of memory at startup
8) It is free, yet high quality!
References:
http://tomcat.apache.org
http://java.sun.com
http://jakarta.apache.org/

23

More Related Content

PPTX
LINUX DISTRIBUTIONS.pptx
PPTX
Apache tomcat
PPTX
Apache web server
PPTX
Web Servers(IIS, NGINX, APACHE)
PPTX
An introduction to Maven
PPTX
Apache Maven
PDF
Introduction to gradle
PPTX
Setting up a web server in Linux (Ubuntu)
LINUX DISTRIBUTIONS.pptx
Apache tomcat
Apache web server
Web Servers(IIS, NGINX, APACHE)
An introduction to Maven
Apache Maven
Introduction to gradle
Setting up a web server in Linux (Ubuntu)

What's hot (20)

PPTX
Introduction to Node js
PPTX
ReactJS presentation.pptx
PDF
An introduction to React.js
PPTX
Reactjs
PPTX
Servlets
PDF
Angular - Chapter 4 - Data and Event Handling
PPTX
Java Server Pages
PPTX
JSON: The Basics
PPT
Learn javascript easy steps
PDF
Nodejs presentation
PDF
Introduction to jest
PPT
Jsp ppt
PPTX
Intro to React
PDF
REST APIs with Spring
PPTX
Node.js Express
PPTX
Introduction to React JS for beginners
PDF
jQuery for beginners
PDF
react redux.pdf
PPTX
Introduction to spring boot
PDF
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Introduction to Node js
ReactJS presentation.pptx
An introduction to React.js
Reactjs
Servlets
Angular - Chapter 4 - Data and Event Handling
Java Server Pages
JSON: The Basics
Learn javascript easy steps
Nodejs presentation
Introduction to jest
Jsp ppt
Intro to React
REST APIs with Spring
Node.js Express
Introduction to React JS for beginners
jQuery for beginners
react redux.pdf
Introduction to spring boot
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Ad

Viewers also liked (20)

PPT
Tomcat Server
PDF
To set enviroment variable
PPT
HABJ Social Networking Basics
PPTX
RabbitMQ
PPS
UNIX - Class1 - Basic Shell
PPS
UNIX - Class4 - Advance Shell Scripting-P1
PPS
UNIX - Class5 - Advance Shell Scripting-P2
PDF
Unixshellscript 100406085942-phpapp02
PDF
Trouble shoot with linux syslog
PDF
Linux Shell Scripting Craftsmanship
PPT
Karkha unix shell scritping
PDF
오픈소스 그리고 기회
PDF
Module 13 - Troubleshooting
PDF
Advanced Oracle Troubleshooting
ODP
Linux troubleshooting tips
PPT
unix training | unix training videos | unix course unix online training
PPTX
Process monitoring in UNIX shell scripting
KEY
Fusion Middleware 11g How To Part 2
PDF
25 Apache Performance Tips
Tomcat Server
To set enviroment variable
HABJ Social Networking Basics
RabbitMQ
UNIX - Class1 - Basic Shell
UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class5 - Advance Shell Scripting-P2
Unixshellscript 100406085942-phpapp02
Trouble shoot with linux syslog
Linux Shell Scripting Craftsmanship
Karkha unix shell scritping
오픈소스 그리고 기회
Module 13 - Troubleshooting
Advanced Oracle Troubleshooting
Linux troubleshooting tips
unix training | unix training videos | unix course unix online training
Process monitoring in UNIX shell scripting
Fusion Middleware 11g How To Part 2
25 Apache Performance Tips
Ad

Similar to Tomcat (20)

PPTX
Introduction of Tomcat
PPT
Auxiliary : Tomcat
PPT
Tomcat Configuration (1)
PPT
Lect06 tomcat1
PPT
Tomcat server
PPTX
Web container and Apache Tomcat
PDF
Apache Tomcat 8 Application Server
PPT
TOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALA
PPTX
Web servers
PDF
Tomcat and apache httpd training
PDF
01 overview-and-setup
PDF
Installing tomcat on windows 7
PPT
Java Servlets
PPT
Updated-Servlet Introduction Lifecycle of Servlet
PPT
Web Applications and Deployment
PPTX
01 overview-servlets-and-environment-setup
PPTX
DOC
Java Servlets & JSP
PDF
Tomcat tutorail
Introduction of Tomcat
Auxiliary : Tomcat
Tomcat Configuration (1)
Lect06 tomcat1
Tomcat server
Web container and Apache Tomcat
Apache Tomcat 8 Application Server
TOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALA
Web servers
Tomcat and apache httpd training
01 overview-and-setup
Installing tomcat on windows 7
Java Servlets
Updated-Servlet Introduction Lifecycle of Servlet
Web Applications and Deployment
01 overview-servlets-and-environment-setup
Java Servlets & JSP
Tomcat tutorail

Recently uploaded (20)

PDF
The influence of sentiment analysis in enhancing early warning system model f...
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Statistics on Ai - sourced from AIPRM.pdf
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPT
Geologic Time for studying geology for geologist
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Architecture types and enterprise applications.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPT
Module 1.ppt Iot fundamentals and Architecture
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
UiPath Agentic Automation session 1: RPA to Agents
The influence of sentiment analysis in enhancing early warning system model f...
Basics of Cloud Computing - Cloud Ecosystem
TEXTILE technology diploma scope and career opportunities
Statistics on Ai - sourced from AIPRM.pdf
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Consumable AI The What, Why & How for Small Teams.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Accessing-Finance-in-Jordan-MENA 2024 2025.pdf
Improvisation in detection of pomegranate leaf disease using transfer learni...
A proposed approach for plagiarism detection in Myanmar Unicode text
Geologic Time for studying geology for geologist
Flame analysis and combustion estimation using large language and vision assi...
Training Program for knowledge in solar cell and solar industry
Architecture types and enterprise applications.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Module 1.ppt Iot fundamentals and Architecture
Microsoft Excel 365/2024 Beginner's training
UiPath Agentic Automation session 1: RPA to Agents

Tomcat

  • 1. Apache Tomcat (Version 6.0) Presented by Venkat pinagadi NJIT 1
  • 2. What is Apache Tomcat?     2 Apache is the most common HTTP Web Server on the Internet. It is the Web server used at http://web.njit.edu The Tomcat server is a Java-based Web Application container which is used to run Servlet and Java Server Pages (JSP) Web applications. Tomcat has become the reference implementation for both the Java Servlets and Java Server Pages specifications. Tomcat was chosen to be the official Sun Web Component (JSP/Servlet ) Container Reference Implementation.
  • 3. What is Apache Tomcat? [Contd.]   3 Apache Tomcat is used to serve Java Servlets and Java Server Pages. It's a complex piece of software and though the documentation is very comprehensive, it helps to have a good reference work to hand. It is an open source Java Servlet application server used to deploy Java applications after they are built with JSP and Servlets. It can be used as a stand-alone product or it can be integrated with the Apache server.
  • 4. What is a container?  Containers are the interface between a component and the low-level platform-specific functionality that supports the component.  Before a Web, enterprise bean, or application client component can be executed, it must be assembled into a J2EE module and deployed into its container. 4
  • 5. J2EE Containers (Server)    5 J2EE server : The runtime portion of a J2EE product. A J2EE server provides EJB and Web containers. Enterprise JavaBeans (EJB) container : Manages the execution of enterprise beans for J2EE applications. Enterprise beans and their container run on the J2EE server. Web container : Manages the execution of JSP page and servlet components for J2EE applications. Web components and their container run on the J2EE server.
  • 6. J2EE Containers (Client)   6 Application client container : Manages the execution of application client components. Application clients and their container run on the client. Applet container : Manages the execution of applets. Consists of a Web browser and Java Plug-in running on the client together.
  • 7. J2EE Server and Containers Client Browser Web Server (Apache) Servlet JSP page Tomcat Java Web Container Application Client Client Container Client Machine 7 Database Session Entity Bean Bean EJB Container JBoss, WebSphere, WebLogic, etc
  • 8. Working environments   8 Java is already installed on PCs in the NJIT PC labs and the Solaris and Linux labs on the second floor of GITC. Tomcat is also installed on the Solaris machines. It is recommended that all work with Tomcat be done on AFS31 through AFS35. The installation guides on the following slides are for your own computers.
  • 9. Initial Setup   9 The Java Software Development Kit (JDK) is aimed at Java developers. It consists of Sun's Java Runtime Environment bundled with programming tools. Java Runtime Environment (JRE) is the software required to run any application deployed on Java platform. Download J2SE Runtime Environment Install the JRE according to the instructions included with the release.
  • 10. Installation of Apache Tomcat Initiate the download of Tomcat from the site http://tomcat.apache.org/  View the corresponding documentation and setup for help in running on various platform and requirements.  After downloading follow the instructions to start installation. 10
  • 11. Start Up Tomcat   11 Tomcat can be started by executing the following commands: $CATALINA_HOMEbinstartup.bat (Windows) $CATALINA_HOME/bin/startup.sh (Unix) After startup, the default web applications included with Tomcat will be available by visiting: http://localhost:8080/
  • 12. Link Details http://localhost:8080/myapp/chapter01/sample00.html Server is local protocol is http 12 Can OMIT if using ROOT as default Listens on port 8080 Path to file
  • 13. Shut Down Tomcat  13 Tomcat can be shut down by executing the following command: $CATALINA_HOMEbinshutdown (Windows) $CATALINA_HOME/bin/shutdown.sh (Unix)
  • 14. Enabling SSI and CGI support SSI and CGI are disabled by default for security reasons to enable them:  To enable and configure CGI support, please see the cgi-howto.html page.  To enable and configue SSI support, please see the ssi-howto.html page. 14
  • 15. Security Managers URL In order to grant security permissions to JARs located inside the web application repository, use URLs of of the following format in your policy file: file:${catalina.home}/webapps/examples/WEBINF/lib/driver.jar 15
  • 16. Enabling invoker servlet: (NJIT is non-standard)    16 Starting with Tomcat 4.1.12, the invoker servlet is no longer available by default in all webapps. Enabling it for all webapps is possible by editing $CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping definition. Using the invoker servlet in a production environment is not recommended and is unsupported. More details are available on the Tomcat FAQ at http://tomcat.apache.org/faq/misc.html#invoker. WARNING! On NJIT Systems, the invoker “servlet” is in use, and needs to be maintained if you edit your web.xml. A URL must be in the form http://web.njit.edu/~<ucid>/servlet/<classname> for the servlet to be found and executed by Tomcat.
  • 17. UCS at NJIT    17 Apache Tomcat is installed on UCS and servlets can be run after configuration of your account. Basic information will be available from link: http://web.njit.edu/all_topics/Servers/Tomcat/ Changes to servlets are seen immediately. The first time you set up Tomcat, servlets are visible only after the NJIT server is restarted which is done once a day at 6:00 AM. As of 03/2008 Apache is running on afs31-afs35.
  • 18. Any other web server using port 8080 This happens usually when any other web server (or any process) has laid claim to port 8080 and this one is the default HTTP port that Tomcat attempts to bind to at startup. So for changing this, open the file: $CATALINA_HOME/conf/server.xml and search for '8080'. Change it to a port that isn't in use, and is greater than 1024, as ports less than or equal 1024 require superuser (root) access to bind under UNIX. Restart Tomcat. Be sure that you replace the "8080“ in the URL you're using to access Tomcat. If you change the port to 1977, you would request the URL http://localhost:1977/ in your browser. 18
  • 19. Out of environment space error  An "out of environment space" error This happens when running the batch files in Windows 95, 98, or ME operating systems. Right-click on the STARTUP.BAT and SHUTDOWN.BAT files. Click on "Properties", then on the "Memory" tab. For the "Initial environment" field, enter in something like 4096. After you click apply, Windows will create shortcuts which you can use to start and stop the container. 19
  • 20. The 'localhost' machine isn't found error  The 'localhost' machine isn't found. This could happen if you're behind a proxy. If that's the case, make sure the proxy configuration for your browser knows that you shouldn't be going through the proxy to access the "localhost". In Netscape, this is under Edit/Preferences -> Advanced/Proxies, and in Internet Explorer, Tools -> Internet Options -> Connections -> LAN Settings. 20
  • 21. Apache Tomcat Updates  21 The latest version of Apache Tomcat changes regularly so keep updated by visiting the link : http://tomcat.apache.org/
  • 22. Advantages of Tomcat         22 1) It is an open source application server 2) It is a light weight server (no EJB) 3) It is easily configured with apache and IIS 4) Very stable on Unix systems 5) Good documentation online 6) Java Sun compliant 7) Does not require a lot of memory at startup 8) It is free, yet high quality!