SlideShare a Scribd company logo
1 of 14
Prepared by: Dima Gomaa
 Tomcat is a Servlet container (Web server that interacts with
Se rvle ts ) developed under the Jakarta Project of Apache Software
Foundation
 Tomcat implements the Se rvle t and the Java Se rve r Pag e s (JSP)
specifications of Sun Microsystems
 Tomcat is an open-source, non commercial project
◦ Licensed under the Apache Software License
 Tomcat is written in Java (OS independent)
Tomcat is a free open source implementation of java server pages
and java servlets, developed as part of the Jakarta project
under the Apache Software Foundation
More info at:
http://tomcat.apache.org/
 To use Tomcat web server working need to know about:
 Environment variables
 How to start and stop the server
 How to configure Tomcat to pick up web files from your directory
 Extract source zip file into a directory on hard disk. Default directory
is jakarta-tomcat-ve rsio n#.
 A set of subdirectories are automatically created (bin, conf, doc etc)
Tomcat uses two environment variables:
 environment variables:
◦ JAVA_HOME and CATALINA_HOME
 Extract source zip file into a directory on hard disk. Default directory
is jakarta-tomcat-ve rsio n#.
 A set of subdirectories are automatically created (bin, conf, doc etc)
 Tomcat uses two environment variables:
 environment variables:
◦ JAVA_HOME (point to directory containing JDK)
◦ CATALINA_HOME (point to directory containing Tomcat)
 From UNIX shell prompt, go to where Tomcat is installed
◦ dgomaa_debian: cd /usr/local/jakarta-tomcat-1.6…
 Go to the subdirectory bin
 To START:
◦ ./startup.sh
 Tomcat server executes on TCP port 8080 (in case another
server is using the default port 80)
 To test Tomcat, in browser type URL:
http://hostname:8080/
 This will access the Tomcat documentation welcome page if
server working properly
 To STOP Tomcat when it is running
◦ ./shutdown .sh
 By default, Tomcat looks in its own WEBAPPS directory for web
application files (e.g. jsps, html etc)
 To hold application files elsewhere, need to edit the se rve r. xm l
configuration file (in the conf directory) to look in alternate location.
Both <host> and <context> element need to be changed -
NOTE: Always make a backup of server.xml before changing!
In server.xml:
 change Host name parameter appbase from ‘webapps’ to the
preferred directory you want
 <Host name="localhost"debug="0"
appBase=“/home/dgomaa/tomcat-apps/webapps" reloadable =
"true"
To set up an application directory: -
To create a new web application (e.g. newapp) in your
web application directory Tomcat directory :
◦ create a subdirectory of your WEBAPPs directory in which to hold
the web application files
◦ This directory is now the top level directory for the web application
newapp, accessed as
 http://www.domainname/newapp
 An application's directory must contain the following:
◦ The directory WEB-INF/
◦ A legal web.xml file under WEB-INF/
<web-app>
</web-app>
 Environment variable java_home incorrect
 Not putting 8080 in URL (http://localhost:8080)
 Not configuring server.xml to look at correct location of your web
files
 Not starting the server…
 Not re-starting the server when you’ve added/ changed your files
 Not re-setting the environment variables when shell re-started

More Related Content

What's hot

Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clusteringgouthamrv
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuninglovingprince58
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEJacek Laskowski
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd trainingFranck SIMON
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121WANGCHOU LU
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatEgnyte
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance TipsMonitis_Inc
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutSander Temme
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikEdgar Espina
 
introduction to Tomcat Apache
introduction to Tomcat Apache introduction to Tomcat Apache
introduction to Tomcat Apache Pushpendra Tyagi
 
플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포흥래 김
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apachegovindraj8787
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technologyMinal Maniar
 
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...BIOVIA
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletFahmi Jafar
 

What's hot (20)

Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
 
Tomcat next
Tomcat nextTomcat next
Tomcat next
 
Apache TomEE - Tomcat with a kick
Apache TomEE  - Tomcat with a kickApache TomEE  - Tomcat with a kick
Apache TomEE - Tomcat with a kick
 
Tomcat Clustering
Tomcat ClusteringTomcat Clustering
Tomcat Clustering
 
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
Apache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEEApache Tomcat + Java EE = Apache TomEE
Apache Tomcat + Java EE = Apache TomEE
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
ZK_Arch_notes_20081121
ZK_Arch_notes_20081121ZK_Arch_notes_20081121
ZK_Arch_notes_20081121
 
How to monitor and manage Apache Tomcat
How to monitor and manage Apache TomcatHow to monitor and manage Apache Tomcat
How to monitor and manage Apache Tomcat
 
25 Apache Performance Tips
25 Apache Performance Tips25 Apache Performance Tips
25 Apache Performance Tips
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Apache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip HanikApache Tomcat 7 by Filip Hanik
Apache Tomcat 7 by Filip Hanik
 
Tomcatx performance-tuning
Tomcatx performance-tuningTomcatx performance-tuning
Tomcatx performance-tuning
 
introduction to Tomcat Apache
introduction to Tomcat Apache introduction to Tomcat Apache
introduction to Tomcat Apache
 
플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포플랫폼 통합을 위한 Client Module 개발 & 배포
플랫폼 통합을 위한 Client Module 개발 & 배포
 
Integrating tomcat with apache
Integrating tomcat with apacheIntegrating tomcat with apache
Integrating tomcat with apache
 
Java servlet technology
Java servlet technologyJava servlet technology
Java servlet technology
 
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
(ATS4-PLAT01) Core Architecture Changes in AEP 9.0 and their Impact on Admini...
 
Knowledge Sharing : Java Servlet
Knowledge Sharing : Java ServletKnowledge Sharing : Java Servlet
Knowledge Sharing : Java Servlet
 

Similar to Tomcat configuration

Similar to Tomcat configuration (20)

Lect06 tomcat1
Lect06 tomcat1Lect06 tomcat1
Lect06 tomcat1
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
bjhbj
bjhbjbjhbj
bjhbj
 
TOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALA
TOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALATOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALA
TOMCAT WEB SERVER TECHNICAL BY SAIKIRAN PANJALA
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Lecture2
Lecture2Lecture2
Lecture2
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
Apache Web Services
Apache Web ServicesApache Web Services
Apache Web Services
 
Apache
ApacheApache
Apache
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Mc sl54 051_ (1)
Mc sl54 051_ (1)Mc sl54 051_ (1)
Mc sl54 051_ (1)
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
 
Jsp and jstl
Jsp and jstlJsp and jstl
Jsp and jstl
 
解读server.xml文件
解读server.xml文件解读server.xml文件
解读server.xml文件
 
Html servlet example
Html   servlet exampleHtml   servlet example
Html servlet example
 
Information on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHMInformation on Tomcat in cPanel & WHM
Information on Tomcat in cPanel & WHM
 
Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
1 java servlets and jsp
1   java servlets and jsp1   java servlets and jsp
1 java servlets and jsp
 
Jira Rev002
Jira Rev002Jira Rev002
Jira Rev002
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"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
 
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
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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!
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"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...
 
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
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

Tomcat configuration

  • 2.  Tomcat is a Servlet container (Web server that interacts with Se rvle ts ) developed under the Jakarta Project of Apache Software Foundation  Tomcat implements the Se rvle t and the Java Se rve r Pag e s (JSP) specifications of Sun Microsystems  Tomcat is an open-source, non commercial project ◦ Licensed under the Apache Software License  Tomcat is written in Java (OS independent)
  • 3. Tomcat is a free open source implementation of java server pages and java servlets, developed as part of the Jakarta project under the Apache Software Foundation More info at: http://tomcat.apache.org/
  • 4.
  • 5.  To use Tomcat web server working need to know about:  Environment variables  How to start and stop the server  How to configure Tomcat to pick up web files from your directory
  • 6.  Extract source zip file into a directory on hard disk. Default directory is jakarta-tomcat-ve rsio n#.  A set of subdirectories are automatically created (bin, conf, doc etc) Tomcat uses two environment variables:  environment variables: ◦ JAVA_HOME and CATALINA_HOME
  • 7.  Extract source zip file into a directory on hard disk. Default directory is jakarta-tomcat-ve rsio n#.  A set of subdirectories are automatically created (bin, conf, doc etc)  Tomcat uses two environment variables:  environment variables: ◦ JAVA_HOME (point to directory containing JDK) ◦ CATALINA_HOME (point to directory containing Tomcat)
  • 8.  From UNIX shell prompt, go to where Tomcat is installed ◦ dgomaa_debian: cd /usr/local/jakarta-tomcat-1.6…  Go to the subdirectory bin  To START: ◦ ./startup.sh  Tomcat server executes on TCP port 8080 (in case another server is using the default port 80)
  • 9.  To test Tomcat, in browser type URL: http://hostname:8080/  This will access the Tomcat documentation welcome page if server working properly  To STOP Tomcat when it is running ◦ ./shutdown .sh
  • 10.  By default, Tomcat looks in its own WEBAPPS directory for web application files (e.g. jsps, html etc)  To hold application files elsewhere, need to edit the se rve r. xm l configuration file (in the conf directory) to look in alternate location. Both <host> and <context> element need to be changed - NOTE: Always make a backup of server.xml before changing! In server.xml:  change Host name parameter appbase from ‘webapps’ to the preferred directory you want  <Host name="localhost"debug="0" appBase=“/home/dgomaa/tomcat-apps/webapps" reloadable = "true"
  • 11. To set up an application directory: - To create a new web application (e.g. newapp) in your web application directory Tomcat directory : ◦ create a subdirectory of your WEBAPPs directory in which to hold the web application files ◦ This directory is now the top level directory for the web application newapp, accessed as  http://www.domainname/newapp
  • 12.  An application's directory must contain the following: ◦ The directory WEB-INF/ ◦ A legal web.xml file under WEB-INF/ <web-app> </web-app>
  • 13.
  • 14.  Environment variable java_home incorrect  Not putting 8080 in URL (http://localhost:8080)  Not configuring server.xml to look at correct location of your web files  Not starting the server…  Not re-starting the server when you’ve added/ changed your files  Not re-setting the environment variables when shell re-started