SlideShare a Scribd company logo
1 of 23
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

What's hot (20)

jQuery for beginners
jQuery for beginnersjQuery for beginners
jQuery for beginners
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Web servers
Web serversWeb servers
Web servers
 
Presentation about servers
Presentation about serversPresentation about servers
Presentation about servers
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
Spring boot Introduction
Spring boot IntroductionSpring boot Introduction
Spring boot Introduction
 
Asp.net.
Asp.net.Asp.net.
Asp.net.
 
web server
web serverweb server
web server
 
Web Development with Laravel 5
Web Development with Laravel 5Web Development with Laravel 5
Web Development with Laravel 5
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
An Introduction To REST API
An Introduction To REST APIAn Introduction To REST API
An Introduction To REST API
 
React js
React jsReact js
React js
 
Laravel overview
Laravel overviewLaravel overview
Laravel overview
 
React JS
React JSReact JS
React JS
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans
 

Viewers also liked

To set enviroment variable
To set enviroment variableTo set enviroment variable
To set enviroment variableVenkat Pinagadi
 
HABJ Social Networking Basics
HABJ Social Networking BasicsHABJ Social Networking Basics
HABJ Social Networking BasicsJennifer Texada
 
UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1Nihar Ranjan Paital
 
UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2Nihar Ranjan Paital
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslogashok191
 
Linux Shell Scripting Craftsmanship
Linux Shell Scripting CraftsmanshipLinux Shell Scripting Craftsmanship
Linux Shell Scripting Craftsmanshipbokonen
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritpingchockit88
 
오픈소스 그리고 기회
오픈소스 그리고 기회오픈소스 그리고 기회
오픈소스 그리고 기회Sungju Jin
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - TroubleshootingT. J. Saotome
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle TroubleshootingHector Martinez
 
Linux troubleshooting tips
Linux troubleshooting tipsLinux troubleshooting tips
Linux troubleshooting tipsBert Van Vreckem
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training Nancy Thomas
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Dirk Nachbar
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance TipsMonitis_Inc
 
Sql server troubleshooting
Sql server troubleshootingSql server troubleshooting
Sql server troubleshootingNathan Winters
 

Viewers also liked (20)

To set enviroment variable
To set enviroment variableTo set enviroment variable
To set enviroment variable
 
HABJ Social Networking Basics
HABJ Social Networking BasicsHABJ Social Networking Basics
HABJ Social Networking Basics
 
RabbitMQ
RabbitMQRabbitMQ
RabbitMQ
 
UNIX - Class1 - Basic Shell
UNIX - Class1 - Basic ShellUNIX - Class1 - Basic Shell
UNIX - Class1 - Basic Shell
 
UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1UNIX - Class4 - Advance Shell Scripting-P1
UNIX - Class4 - Advance Shell Scripting-P1
 
UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2UNIX - Class5 - Advance Shell Scripting-P2
UNIX - Class5 - Advance Shell Scripting-P2
 
Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02Unixshellscript 100406085942-phpapp02
Unixshellscript 100406085942-phpapp02
 
Trouble shoot with linux syslog
Trouble shoot with linux syslogTrouble shoot with linux syslog
Trouble shoot with linux syslog
 
Linux Shell Scripting Craftsmanship
Linux Shell Scripting CraftsmanshipLinux Shell Scripting Craftsmanship
Linux Shell Scripting Craftsmanship
 
Karkha unix shell scritping
Karkha unix shell scritpingKarkha unix shell scritping
Karkha unix shell scritping
 
오픈소스 그리고 기회
오픈소스 그리고 기회오픈소스 그리고 기회
오픈소스 그리고 기회
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 
APACHE
APACHEAPACHE
APACHE
 
Advanced Oracle Troubleshooting
Advanced Oracle TroubleshootingAdvanced Oracle Troubleshooting
Advanced Oracle Troubleshooting
 
Linux troubleshooting tips
Linux troubleshooting tipsLinux troubleshooting tips
Linux troubleshooting tips
 
unix training | unix training videos | unix course unix online training
unix training |  unix training videos |  unix course  unix online training unix training |  unix training videos |  unix course  unix online training
unix training | unix training videos | unix course unix online training
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2Fusion Middleware 11g How To Part 2
Fusion Middleware 11g How To Part 2
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance Tips
 
Sql server troubleshooting
Sql server troubleshootingSql server troubleshooting
Sql server troubleshooting
 

Similar to Tomcat

Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)nazeer pasha
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Servermohamedmoharam
 
Java Servlets
Java ServletsJava Servlets
Java ServletsNitin Pai
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and DeploymentBG Java EE Course
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configurationDima Gomaa
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMHTS Hosting
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apachegovindraj8787
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpodilodif
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed introRich Helton
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st weekRaisa Anjani
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jspJafar Nesargi
 
01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setupdhrubo kayal
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technologyMinal Maniar
 
Swift configurator installation-manual
Swift configurator installation-manualSwift configurator installation-manual
Swift configurator installation-manualPramod Sharma
 

Similar to Tomcat (20)

Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHM
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apache
 
Mc sl54 051_ (1)
Mc sl54 051_ (1)Mc sl54 051_ (1)
Mc sl54 051_ (1)
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
Servlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtpServlet and jsp development with eclipse wtp
Servlet and jsp development with eclipse wtp
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
 
Raisa anthony web programming 1st week
Raisa anthony   web programming 1st weekRaisa anthony   web programming 1st week
Raisa anthony web programming 1st week
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
Lect06 tomcat1
Lect06 tomcat1Lect06 tomcat1
Lect06 tomcat1
 
bjhbj
bjhbjbjhbj
bjhbj
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
Swift configurator installation-manual
Swift configurator installation-manualSwift configurator installation-manual
Swift configurator installation-manual
 

Recently uploaded

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 

Recently uploaded (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 

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!