SlideShare a Scribd company logo
Apache TomcatApache Tomcat
Representation and Management of
Data on the Web
What is Tomcat?What is Tomcat?
• Tomcat is a Servlet container (Web server that interacts
with Servlets) developed under the Jakarta Project of
Apache Software Foundation
• Tomcat implements the Servlet and the Java Server
Pages (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)
A Servlet ExampleA Servlet Example
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("<html><head><title>Hello</title></head>");
out.println("<body>");
out.println("<h2>" + new java.util.Date() + "</h2>");
out.println("<h1>Hello World</h1></body></html>");
}
} HelloWorld.java
http://localhost/dbi/hello
A JSP ExampleA JSP Example
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h2><%= new java.util.Date() %></h2>
<h1>Hello World</h1>
</body>
</html> hello.jsp
http://localhost/dbi/hello.jsp

Recommended for you

Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker

This document provides an introduction to Docker. It begins by introducing the presenter and agenda. It then explains that containers are not virtual machines and discusses the differences in architecture and benefits. It covers the basic Docker workflow of building, shipping, and running containers. It discusses Docker concepts like images, containers, and registries. It demonstrates basic Docker commands. It shows how to define a Dockerfile and build an image. It discusses data persistence using volumes. It covers using Docker Compose to define and run multi-container applications and Docker Swarm for clustering. It provides recommendations for getting started with Docker at different levels.

triforktriforkselecteddocker
Node js introduction
Node js introductionNode js introduction
Node js introduction

Node.js is a server-side JavaScript platform built on Google's V8 engine. It is non-blocking and asynchronous, making it suitable for data-intensive real-time applications. The document discusses how to install Node.js and its dependencies on Ubuntu, introduces key Node.js concepts like events and the event loop, and provides examples of popular Node.js packages and use cases.

setting up node with virtual appliancescaling the webnode
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics

The purpose of this solution is to go over the Docker basics which explain containers, images, how they work, where to find them, the architecture (client, daemon), the difference between Docker and VMs, and we will see Docker and an image and see some commands.

Another JSP ExampleAnother JSP Example
<html>
<head><title>Numbers</title></head>
<body>
<h1>The numbers 1 to 10:</h1>
<ul>
<% int i;
for (i=1; i<=10; ++i) { %>
<li>Number <%=i%> </li>
<%}%>
</ul>
</body>
</html> numbers.jsp
http://localhost/dbi/numbers.jsp
Running TomcatRunning Tomcat
Tomcat Directory StructureTomcat Directory Structure
Base and Home DirectoriesBase and Home Directories
• The directory TOMCAT-HOME contains
executables and libraries required for the server
launching, running and stopping
- This directory is placed under /usr/local/…
• The directory TOMCAT-BASE contains the
Web-site content, Web applications and
configuration data
- This directory is placed under your home directory

Recommended for you

Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation

This document provides an introduction and overview of Node.js and MongoDB. It discusses that Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine that uses an event-driven, non-blocking I/O model. It can be used for real-time applications and is well-suited for I/O-intensive applications. MongoDB is also introduced as a popular JSON-based NoSQL database that can be easily used with Node.js applications. Examples are given for connecting to MongoDB from Node.js code.

Maven ppt
Maven pptMaven ppt
Maven ppt

Learn All Aspects Of Maven step by step, Enhance your skills & Launch Your Career, On-Demand Course affordable price & classes on virtually every topic.Try Before You Buy

it courses online trainingmaven trainingonline training
IIS
IISIIS
IIS

IIS (Internet Information Services) is a web server application created by Microsoft for use with Windows operating systems. It supports protocols like HTTP, HTTPS, FTP, and more. IIS has been included with Windows NT, Windows 2000, Windows Server 2003, and beyond. Newer versions of IIS have added features like support for additional authentication mechanisms, modules for extending functionality, and performance/security improvements.

Installing TomcatInstalling Tomcat
• Create a directory for tomcat base
- For example: mkdir ~/tomcat-base
• Set the environment variable CATALINA_BASE to
your tomcat-base directory
- For example: setenv CATALINA_BASE ~/tomcat-base
- Insert this line into your .cshrc file
• Run ~dbi/tomcat/bin/setup
• $CATALINA_BASE is now a regular Tomcat base
directory, and Tomcat is ready to run
Running TomcatRunning Tomcat
• To start tomcat use ~dbi/tomcat/bin/catalina run
• Or, in background, ~dbi/tomcat/bin/catalina start
• To stop tomcat use ~dbi/tomcat/bin/catalina stop
• To see the default page of Tomcat from your browser
use the URL http://<machine-name>:<port>/
- machine-name is the name of the machine on which Tomcat
runs and port is the port you chose for Tomcat
• You can also use http://localhost:<port>/ if your
browser runs on the same machine as Tomcat
From Scratch to ServerFrom Scratch to Server
 Tomcat server

Recommended for you

Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation

This document discusses repetitive system administration tasks and proposes Ansible as a solution. It describes how Ansible works using agentless SSH to automate tasks like software installation, configuration, and maintenance across multiple servers. Key aspects covered include Ansible's inventory, modules, playbooks, templates, variables, roles and Docker integration. Ansible Tower is also introduced as a GUI tool for running Ansible jobs. The document recommends Ansible for anyone doing the same tasks across multiple servers to gain efficiencies over manual processes.

ansible presentation
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form

The document provides an overview of ASP.NET compilation and configuration. It discusses how ASP.NET code is compiled into assemblies and MSIL. It also covers the benefits of compilation such as performance, security and stability. Additionally, it describes ASP.NET's compilation architecture including features like multiple language support, automatic compilation, and flexible deployment options. Finally, it discusses website configuration in ASP.NET and how it uses a hierarchical system of configuration.

asp.net.net framework
Maven
MavenMaven
Maven

The document discusses using Maven for automation builds. It covers quick starting a Maven project, the Maven lifecycle and phases, dependency and plugin management, and integrating Maven with IDEs like Eclipse. Key points include how to create a basic Maven project, the different Maven directories, common Maven commands, using the Surefire plugin to run tests, and configuring test dependencies.

Choosing a port for TomcatChoosing a port for Tomcat
• In the file $CATALINA_HOME/conf/server.xml you
will find the element Connector of Service “Catalina”
• Choose a port (greater than 1024) and change the value
of the port attribute to your chosen one:
<Server>
…
<Service name="Catalina”>
<Connector port="8090"/>
…
</Service>
…
</Server>
Creating Web ApplicationsCreating Web Applications
Creating Web ApplicationsCreating Web Applications
• A Web application is a self-contained subtree of
the Web site
• A Web application usually contains several Web
resources like HTML files, Servlets, JSP files,
and other resources like Database tables
• Each Web application has its own subdirectory
under the directory
$CATALINA_BASE/webapps/
The Directory Structure of a WebThe Directory Structure of a Web
ApplicationApplication
• Tomcat automatically identifies a directory
$CATALINA_BASE/webapps/myApp/ with
the relative URL /myApp/
• For example, a file named index.html in myApp
is mapped to by the following URLs:
http://machine:port/myApp/index.html
http://machine:port/myApp/

Recommended for you

Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction

Ansible is tool for Configuration Management. The big difference to Chef and Puppet is, that Ansible doesn't need a Master and doesn't need a special client on the servers. It works completely via SSH and the configuration is done in Yaml. These slides give a short introduction & motivation for Ansible.

configuration managementansiblelinux
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application

Topics Covered ============================== Overview of .NET Overview of ASP.NET Creating an ASP.NET Web Form Adding Event Procedures Validating User Input

aspnet
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI

Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of software development process, with continuous integration and facilitating technical aspects of continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat.

jenkins
The Directory Structure of a WebThe Directory Structure of a Web
ApplicationApplication
• You can also use subdirectories under myApp
• For example: the file myApp/myImages/im.gif
is mapped to by the URL
http://machine:port/myApp/myImages/im.gif
• By default, Tomcat maps the root directory
(http://localhost:8090/) to the directory
webapps/ROOT/
- You can change this default
The Directory Structure of a WebThe Directory Structure of a Web
ApplicationApplication
• An application's directory must contain the
following:
- The directory WEB-INF/
- A legal web.xml file under WEB-INF/
<web-app>
</web-app>
From Scratch to ApplicationsFrom Scratch to Applications
 Tomcat server

Recommended for you

infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code

The document discusses infrastructure as code best practices on AWS. It provides an overview of using AWS CloudFormation to define infrastructure in code. AWS CloudFormation allows infrastructure to be provisioned in an automated and repeatable way using templates that are version controlled like code. The document outlines the key components of a CloudFormation template including parameters, mappings, resources, outputs and conditionals. It also discusses using CloudFormation to bootstrap applications on EC2 instances.

devopsaws cloudformationaws
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible

Ricardo Schmidt gave a presentation on Ansible, an open source tool for configuration management, application deployment, provisioning, and orchestration. He explained that Ansible is fast, clear, complete, and secure. It uses SSH to connect to nodes agentlessly without requiring additional firewall rules or open ports. Key components include the inventory to define hosts and groups, modules to run tasks on nodes, and playbooks to orchestrate tasks across multiple hosts. The presentation demonstrated Ansible's capabilities through examples and a demo of its core features.

ansible automation configuration management provis
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction

Maven is a build tool that can manage a project's build process, dependencies, documentation and reporting. It uses a Project Object Model (POM) file to store build configuration and metadata. Maven has advantages over Ant like built-in functionality for common tasks, cross-project reuse, and support for conditional logic. It works by defining the project with a POM file then running goals bound to default phases like compile, test, package to build the project.

maven tutorial maven java build ant hello mav
Configuring a Web ApplicationConfiguring a Web Application
• Application-specific configuration and declarations are
written in the file myApp/WEB-INF/web.xml
• This file contains:
- Servlet declarations, mappings and parameters
- Default files for directory requests
- Error pages (sent in cases of HTTP errors)
- Security constraints
- Session time-out specification
- Context (application) parameters
- And more…
Error PagesError Pages
• Use the error-page element to define the page
sent in case of an HTTP error that occurs within
the application context
• An error page element has two sub elements:
- error-code - the HTTP error status code
- location - the page that should be sent
Welcome Page ExampleWelcome Page Example
<html>
<head><title>Not Found</title></head>
<body>
<h1 style="text-align:center; color:green">
Sorry, no such file...
</h1>
</body>
</html>
my404.html
<web-app>
<error-page>
<error-code>404</error-code>
<location>/my404.html</location>
</error-page>
</web-app>
web.xml
 Tomcat server

Recommended for you

Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible

Ansible is an automation platform that allows users to configure, deploy, and manage applications on servers. It combines multi-node software deployment, configuration management, and task execution. Ansible works by provisioning machines using SSH and executing commands via modules. Playbooks allow users to automate complex deployment workflows through YAML scripts. Roles in Ansible allow for reusable and modular components.

devops ansible continuous deployment
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training

● Fundamentals ● Key Components ● Best practices ● Spring Boot REST API Deployment ● CI with Ansible ● Ansible for AWS ● Provisioning a Docker Host ● Docker&Ansible https://github.com/maaydin/ansible-tutorial

ansibleinfrastructure as codedevops
Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server

The document provides an overview of Tomcat and JBoss, open-source servlet containers. It discusses the origins and frameworks of Tomcat and JBoss, how to get started with Tomcat configuration, deployment, security, and load balancing of Tomcat instances with Apache HTTP Server. Key configuration files for Tomcat are also summarized.

serverapplicationweb
 Tomcat server
Welcome PagesWelcome Pages
• The (optional) welcome-file-list element contains a list
of file names
• When the URL request is a directory name, Tomcat
automatically brings the first file on the list
• If that file is not found, the server then tries the next file
in the list, and so on
• This file can be of any type, e.g., HTML, JSP, image,
etc.
• The default welcome list for all applications is set in
$CATALINA_BASE/conf/web.xml
Welcome Page ExampleWelcome Page Example
<html>
<head><title>Welcome</title></head>
<body>
<h1 style="text-align:center; color:red">
Welcome Dear Visitor!
</h1>
</body>
</html>
welcome.html
<web-app>
<welcome-file-list>
<welcome-file>welcome.html</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
web.xml
 Tomcat server

Recommended for you

Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation

Overview of key new features and standards supported in Tomcat 7.0, by the Tomcat 7 release manager Mark Thomas.

programmingtomcat 7tomcat
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server

The document provides instructions for installing Apache Tomcat 8 application server on CentOS. It describes downloading and installing Java 8, downloading and extracting the Tomcat archive, configuring environment variables and ports, starting Tomcat, creating user accounts, deploying WAR files, and customizing the Java virtual machine settings. It also discusses using Nginx as a reverse proxy to route port 80 traffic to Tomcat running on port 8080.

Hacking Tomcat
Hacking TomcatHacking Tomcat
Hacking Tomcat

The document provides an overview of the Apache Tomcat web server and servlet container. It discusses Tomcat's history and architecture, how applications are deployed, and how requests are processed. Performance optimization techniques are also covered, noting that Tomcat is designed for scalability out of the box with minimal tuning typically required.

Tomcat and Java ClassesTomcat and Java Classes
• Tomcat uses Java classes you provide in order to
run Servlets and JSP files
- For example, the Servlets themselves!
• Tomcat 5.x initialization scripts ignore your
environment CLASSPATH variable
• Classes are expected to be placed (or linked) at
some predefined places in its directories
Java Class LocationsJava Class Locations
• Tomcat expects to find Java classes in class files (in a
directory named classes) and JAR files (in a directory
named lib) in the following places:
• TOMCAT-HOME/common/
- Basic runtime classes. No need to touch this directory
• $CATALINA_BASE/shared/
- Classes that are used by all the Web applications
• $CATALINA_BASE/webapps/myApp/WEB-INF/
- Application-specific classes (Servlets are typically here)
Java Class LocationsJava Class Locations
Classes Provided by DBIClasses Provided by DBI
In order to provide the classes you need, like
ORACLE, SAX and DOM-related packages, the
Tomcat-setup script links the directory
$CATALINA_BASE/shared/lib/ to
~dbi/tomcat/shared/lib/, thus the latter
packages are automatically known by your
Tomcat server

Recommended for you

Internet Information Server (IIS)
Internet Information Server (IIS)Internet Information Server (IIS)
Internet Information Server (IIS)

Este documento describe la instalación y configuración del servidor web IIS en Windows Server, y compara IIS con el servidor Apache. Explica cómo agregar e instalar IIS como una función en Windows Server, y cómo configurar un sitio web básico. Luego compara las características principales de IIS y Apache, como el soporte, los lenguajes de programación compatibles y los costos. El autor recomienda Apache debido a su flexibilidad, opciones de acceso y costo más bajo.

redesinternet information serveriis
Understanding IIS
Understanding IISUnderstanding IIS
Understanding IIS

Lets understand the Internet Information Services better by knowing the main components and peep into the different architecture

internetinformationweb server
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training

Verify Tomcat is running ps -ef | grep tomcat ● Stopping Tomcat ./shutdown.sh antislashn.org Tomcat and Apache httpd - Installation 7 / 16 Installing Apache httpd ● Download Apache httpd ● http://httpd.apache.org/download.cgi ● select the source code or binary package ● for CentOS, use yum to install httpd yum install httpd antislashn.org Tomcat and Apache httpd - Installation 8 / 16 Installing Apache httpd ● Start httpd service service httpd start

apachetomcatmod_jk
Tomcat 5.0 ManagerTomcat 5.0 Manager
• Tomcat 5.0 comes with a Web application called
“manager”, which supports functions for
managing Web applications
• You can either use the HTML interface at
http://<machine>:<port>/manager/html/ or send
direct HTTP requests to it
• You will need to authenticate as a privileged user
- Use the username “admin” with no password
Tomcat 5.0 ManagerTomcat 5.0 Manager
• Using the manager, you can
- Deploy a Web application by posting a WAR file
- Undeploy a deployed Web application
- Start/stop a Web application (make it available/unavailable)
- Reload an existing Web application (unpack new WARs)
• Warning: while “stop” makes an application unavailable,
“undeploy” deletes the application directory and WAR file
from webapps/
Tomcat and EclipseTomcat and Eclipse
• You can use an Eclipse plugin for Tomcat Web-
application development
• The “Sysdeo Eclipse Tomcat Launcher” plugin
is installed in CS
• Using this plugin, you can start/stop the server,
reload an application, etc.
• Detailed explanations in the course home-page
 Tomcat server

Recommended for you

Delivery of media content of IIS Media Services
Delivery of media content of  IIS Media ServicesDelivery of media content of  IIS Media Services
Delivery of media content of IIS Media Services

The document discusses progressive download and streaming delivery of media content. It describes challenges with low bandwidth and inconsistent network conditions. Solutions proposed include adaptive bitrate throttling using Smooth Streaming to provide the highest quality for varying network speeds. Caching and utilizing HTTP capabilities can help address problems of no caching, unnecessary infrastructure and non-rational channel usage. The roadmap outlines adding support for Smooth Streaming delivery in the second quarter of 2009.

sefsoftwareengineering
Web весна 2012 лекция 3
Web весна 2012 лекция 3Web весна 2012 лекция 3
Web весна 2012 лекция 3
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch

Peter Doschkinow, langjähriger Java-Experte und Mitarbeiter bei Oracle, gab in seiner Präsentation einen Überblick über die interessantesten und spannendsten Neuerungen in der neusten Java Standard- und Enterprise Edition.

javaee7se8

More Related Content

What's hot

Ansible
AnsibleAnsible
Ansible
Kamil Lelonek
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
Apaichon Punopas
 
Monitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com ZabbixMonitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com Zabbix
André Déo
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Frederik Mogensen
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
Joseph de Castelnau
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
Sourabh Saxena
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
Arvind Devaraj
 
Maven ppt
Maven pptMaven ppt
Maven ppt
natashasweety7
 
IIS
IISIIS
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
Suresh Kumar
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
Md. Mahedee Hasan
 
Maven
MavenMaven
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
Rishi Kothari
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
Viyaan Jhiingade
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
Amazon Web Services
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
Ricardo Schmidt
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
Omid Vahdaty
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
Mehmet Ali Aydın
 

What's hot (20)

Ansible
AnsibleAnsible
Ansible
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
Monitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com ZabbixMonitoramento de Aplicações Web Modernas com Zabbix
Monitoramento de Aplicações Web Modernas com Zabbix
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Dockers and containers basics
Dockers and containers basicsDockers and containers basics
Dockers and containers basics
 
Nodejs presentation
Nodejs presentationNodejs presentation
Nodejs presentation
 
Maven ppt
Maven pptMaven ppt
Maven ppt
 
IIS
IISIIS
IIS
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Maven
MavenMaven
Maven
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Developing an ASP.NET Web Application
Developing an ASP.NET Web ApplicationDeveloping an ASP.NET Web Application
Developing an ASP.NET Web Application
 
Jenkins CI
Jenkins CIJenkins CI
Jenkins CI
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
Automating with Ansible
Automating with AnsibleAutomating with Ansible
Automating with Ansible
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 

Viewers also liked

Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
Anirban Majumdar
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
Tomcat Expert
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
mohamedmoharam
 
Hacking Tomcat
Hacking TomcatHacking Tomcat
Hacking Tomcat
guestc27cd9
 
Internet Information Server (IIS)
Internet Information Server (IIS)Internet Information Server (IIS)
Internet Information Server (IIS)
Rosariio92
 
Understanding IIS
Understanding IISUnderstanding IIS
Understanding IIS
Om Vikram Thapa
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
Franck SIMON
 
Delivery of media content of IIS Media Services
Delivery of media content of  IIS Media ServicesDelivery of media content of  IIS Media Services
Delivery of media content of IIS Media Services
SQALab
 
Web весна 2012 лекция 3
Web весна 2012 лекция 3Web весна 2012 лекция 3
Web весна 2012 лекция 3
Technopark
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
Digicomp Academy AG
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
Guo Albert
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
Sander Temme
 
Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)
Logico
 
Jenkins hudsonci-101002103143-phpapp02
Jenkins hudsonci-101002103143-phpapp02Jenkins hudsonci-101002103143-phpapp02
Jenkins hudsonci-101002103143-phpapp02
Praveen Pamula
 
Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09
Claude Coulombe
 
INTRODUCTION TO IIS
INTRODUCTION TO IISINTRODUCTION TO IIS
INTRODUCTION TO IIS
sanya6900
 
Using Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your InfrastructureUsing Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your Infrastructure
Phil Windley
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
lovingprince58
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Chris Richardson
 
лекция №6
лекция №6лекция №6
лекция №6
student_kai
 

Viewers also liked (20)

Tomcat Server
Tomcat ServerTomcat Server
Tomcat Server
 
Introduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 PresentationIntroduction to Apache Tomcat 7 Presentation
Introduction to Apache Tomcat 7 Presentation
 
Apache Tomcat 8 Application Server
Apache Tomcat 8 Application ServerApache Tomcat 8 Application Server
Apache Tomcat 8 Application Server
 
Hacking Tomcat
Hacking TomcatHacking Tomcat
Hacking Tomcat
 
Internet Information Server (IIS)
Internet Information Server (IIS)Internet Information Server (IIS)
Internet Information Server (IIS)
 
Understanding IIS
Understanding IISUnderstanding IIS
Understanding IIS
 
Tomcat and apache httpd training
Tomcat and apache httpd trainingTomcat and apache httpd training
Tomcat and apache httpd training
 
Delivery of media content of IIS Media Services
Delivery of media content of  IIS Media ServicesDelivery of media content of  IIS Media Services
Delivery of media content of IIS Media Services
 
Web весна 2012 лекция 3
Web весна 2012 лекция 3Web весна 2012 лекция 3
Web весна 2012 лекция 3
 
Java SE 8 & EE 7 Launch
Java SE 8 & EE 7 LaunchJava SE 8 & EE 7 Launch
Java SE 8 & EE 7 Launch
 
Java Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC FrameworkJava Server Faces + Spring MVC Framework
Java Server Faces + Spring MVC Framework
 
Apache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling UpApache Performance Tuning: Scaling Up
Apache Performance Tuning: Scaling Up
 
Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)Nashorn: JavaScript Running on Java VM (English)
Nashorn: JavaScript Running on Java VM (English)
 
Jenkins hudsonci-101002103143-phpapp02
Jenkins hudsonci-101002103143-phpapp02Jenkins hudsonci-101002103143-phpapp02
Jenkins hudsonci-101002103143-phpapp02
 
Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09Ajax en Java - GTI780 & MTI780 - ETS - A09
Ajax en Java - GTI780 & MTI780 - ETS - A09
 
INTRODUCTION TO IIS
INTRODUCTION TO IISINTRODUCTION TO IIS
INTRODUCTION TO IIS
 
Using Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your InfrastructureUsing Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your Infrastructure
 
Tomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance TuningTomcat Optimisation & Performance Tuning
Tomcat Optimisation & Performance Tuning
 
Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)Developing modular, polyglot applications with Spring (SpringOne India 2012)
Developing modular, polyglot applications with Spring (SpringOne India 2012)
 
лекция №6
лекция №6лекция №6
лекция №6
 

Similar to Tomcat server

Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
nazeer pasha
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
Dima Gomaa
 
bjhbj
bjhbjbjhbj
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
Auwal Amshi
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
Praveen Yadav
 
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
Saikiran Panjala
 
Introduction to Java Servlets and JSP (1).ppt
Introduction to Java Servlets and JSP (1).pptIntroduction to Java Servlets and JSP (1).ppt
Introduction to Java Servlets and JSP (1).ppt
ansariparveen06
 
SCWCD : Servlet web applications : CHAP 3
SCWCD : Servlet web applications : CHAP 3SCWCD : Servlet web applications : CHAP 3
SCWCD : Servlet web applications : CHAP 3
Ben Abdallah Helmi
 
Lecture2
Lecture2Lecture2
SCWCD : Servlet web applications : CHAP : 3
SCWCD : Servlet web applications : CHAP : 3SCWCD : Servlet web applications : CHAP : 3
SCWCD : Servlet web applications : CHAP : 3
Ben Abdallah Helmi
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
Nitin Pai
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
Aren Zomorodian
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
Adil Jafri
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
Manjunatha RK
 
Jira Rev002
Jira Rev002Jira Rev002
Jira Rev002
Rich Helton
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
Rich Helton
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
KalsoomTahir2
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
Supratim Ray
 
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
webhostingguy
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
Д. Ганаа
 

Similar to Tomcat server (20)

Tomcat Configuration (1)
Tomcat Configuration (1)Tomcat Configuration (1)
Tomcat Configuration (1)
 
Tomcat configuration
Tomcat configurationTomcat configuration
Tomcat configuration
 
bjhbj
bjhbjbjhbj
bjhbj
 
Web container and Apache Tomcat
Web container and Apache TomcatWeb container and Apache Tomcat
Web container and Apache Tomcat
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 
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
 
Introduction to Java Servlets and JSP (1).ppt
Introduction to Java Servlets and JSP (1).pptIntroduction to Java Servlets and JSP (1).ppt
Introduction to Java Servlets and JSP (1).ppt
 
SCWCD : Servlet web applications : CHAP 3
SCWCD : Servlet web applications : CHAP 3SCWCD : Servlet web applications : CHAP 3
SCWCD : Servlet web applications : CHAP 3
 
Lecture2
Lecture2Lecture2
Lecture2
 
SCWCD : Servlet web applications : CHAP : 3
SCWCD : Servlet web applications : CHAP : 3SCWCD : Servlet web applications : CHAP : 3
SCWCD : Servlet web applications : CHAP : 3
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Cis 274 intro
Cis 274   introCis 274   intro
Cis 274 intro
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
 
Java Servlets & JSP
Java Servlets & JSPJava Servlets & JSP
Java Servlets & JSP
 
Jira Rev002
Jira Rev002Jira Rev002
Jira Rev002
 
Tumbleweed intro
Tumbleweed introTumbleweed intro
Tumbleweed intro
 
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.pptLecture 19 - Dynamic Web - JAVA - Part 1.ppt
Lecture 19 - Dynamic Web - JAVA - Part 1.ppt
 
Tomcat tutorail
Tomcat tutorailTomcat tutorail
Tomcat tutorail
 
Auxiliary : Tomcat
Auxiliary : TomcatAuxiliary : Tomcat
Auxiliary : Tomcat
 
Lecture 19 dynamic web - java - part 1
Lecture 19   dynamic web - java - part 1Lecture 19   dynamic web - java - part 1
Lecture 19 dynamic web - java - part 1
 

Recently uploaded

Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
Rafael Santos
 
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
IJAEMSJORNAL
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
VICTOR MAESTRE RAMIREZ
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
ProexportColombia1
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
Mani Krishna Sarkar
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
Blesson Easo Varghese
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
KishorMahale5
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
peacekipu
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
aarusi sexy model
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
Online music portal management system project report.pdf
Online music portal management system project report.pdfOnline music portal management system project report.pdf
Online music portal management system project report.pdf
Kamal Acharya
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 

Recently uploaded (20)

Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
Evento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recapEvento anual Splunk .conf24 Highlights recap
Evento anual Splunk .conf24 Highlights recap
 
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
Best Practices of Clothing Businesses in Talavera, Nueva Ecija, A Foundation ...
 
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
Advances in Detect and Avoid for Unmanned Aircraft Systems and Advanced Air M...
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
Online music portal management system project report.pdf
Online music portal management system project report.pdfOnline music portal management system project report.pdf
Online music portal management system project report.pdf
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 

Tomcat server

  • 1. Apache TomcatApache Tomcat Representation and Management of Data on the Web
  • 2. What is Tomcat?What is Tomcat? • Tomcat is a Servlet container (Web server that interacts with Servlets) developed under the Jakarta Project of Apache Software Foundation • Tomcat implements the Servlet and the Java Server Pages (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. A Servlet ExampleA Servlet Example public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("<html><head><title>Hello</title></head>"); out.println("<body>"); out.println("<h2>" + new java.util.Date() + "</h2>"); out.println("<h1>Hello World</h1></body></html>"); } } HelloWorld.java http://localhost/dbi/hello
  • 4. A JSP ExampleA JSP Example <html> <head> <title>Hello World</title> </head> <body> <h2><%= new java.util.Date() %></h2> <h1>Hello World</h1> </body> </html> hello.jsp http://localhost/dbi/hello.jsp
  • 5. Another JSP ExampleAnother JSP Example <html> <head><title>Numbers</title></head> <body> <h1>The numbers 1 to 10:</h1> <ul> <% int i; for (i=1; i<=10; ++i) { %> <li>Number <%=i%> </li> <%}%> </ul> </body> </html> numbers.jsp http://localhost/dbi/numbers.jsp
  • 7. Tomcat Directory StructureTomcat Directory Structure
  • 8. Base and Home DirectoriesBase and Home Directories • The directory TOMCAT-HOME contains executables and libraries required for the server launching, running and stopping - This directory is placed under /usr/local/… • The directory TOMCAT-BASE contains the Web-site content, Web applications and configuration data - This directory is placed under your home directory
  • 9. Installing TomcatInstalling Tomcat • Create a directory for tomcat base - For example: mkdir ~/tomcat-base • Set the environment variable CATALINA_BASE to your tomcat-base directory - For example: setenv CATALINA_BASE ~/tomcat-base - Insert this line into your .cshrc file • Run ~dbi/tomcat/bin/setup • $CATALINA_BASE is now a regular Tomcat base directory, and Tomcat is ready to run
  • 10. Running TomcatRunning Tomcat • To start tomcat use ~dbi/tomcat/bin/catalina run • Or, in background, ~dbi/tomcat/bin/catalina start • To stop tomcat use ~dbi/tomcat/bin/catalina stop • To see the default page of Tomcat from your browser use the URL http://<machine-name>:<port>/ - machine-name is the name of the machine on which Tomcat runs and port is the port you chose for Tomcat • You can also use http://localhost:<port>/ if your browser runs on the same machine as Tomcat
  • 11. From Scratch to ServerFrom Scratch to Server
  • 13. Choosing a port for TomcatChoosing a port for Tomcat • In the file $CATALINA_HOME/conf/server.xml you will find the element Connector of Service “Catalina” • Choose a port (greater than 1024) and change the value of the port attribute to your chosen one: <Server> … <Service name="Catalina”> <Connector port="8090"/> … </Service> … </Server>
  • 15. Creating Web ApplicationsCreating Web Applications • A Web application is a self-contained subtree of the Web site • A Web application usually contains several Web resources like HTML files, Servlets, JSP files, and other resources like Database tables • Each Web application has its own subdirectory under the directory $CATALINA_BASE/webapps/
  • 16. The Directory Structure of a WebThe Directory Structure of a Web ApplicationApplication • Tomcat automatically identifies a directory $CATALINA_BASE/webapps/myApp/ with the relative URL /myApp/ • For example, a file named index.html in myApp is mapped to by the following URLs: http://machine:port/myApp/index.html http://machine:port/myApp/
  • 17. The Directory Structure of a WebThe Directory Structure of a Web ApplicationApplication • You can also use subdirectories under myApp • For example: the file myApp/myImages/im.gif is mapped to by the URL http://machine:port/myApp/myImages/im.gif • By default, Tomcat maps the root directory (http://localhost:8090/) to the directory webapps/ROOT/ - You can change this default
  • 18. The Directory Structure of a WebThe Directory Structure of a Web ApplicationApplication • An application's directory must contain the following: - The directory WEB-INF/ - A legal web.xml file under WEB-INF/ <web-app> </web-app>
  • 19. From Scratch to ApplicationsFrom Scratch to Applications
  • 21. Configuring a Web ApplicationConfiguring a Web Application • Application-specific configuration and declarations are written in the file myApp/WEB-INF/web.xml • This file contains: - Servlet declarations, mappings and parameters - Default files for directory requests - Error pages (sent in cases of HTTP errors) - Security constraints - Session time-out specification - Context (application) parameters - And more…
  • 22. Error PagesError Pages • Use the error-page element to define the page sent in case of an HTTP error that occurs within the application context • An error page element has two sub elements: - error-code - the HTTP error status code - location - the page that should be sent
  • 23. Welcome Page ExampleWelcome Page Example <html> <head><title>Not Found</title></head> <body> <h1 style="text-align:center; color:green"> Sorry, no such file... </h1> </body> </html> my404.html <web-app> <error-page> <error-code>404</error-code> <location>/my404.html</location> </error-page> </web-app> web.xml
  • 26. Welcome PagesWelcome Pages • The (optional) welcome-file-list element contains a list of file names • When the URL request is a directory name, Tomcat automatically brings the first file on the list • If that file is not found, the server then tries the next file in the list, and so on • This file can be of any type, e.g., HTML, JSP, image, etc. • The default welcome list for all applications is set in $CATALINA_BASE/conf/web.xml
  • 27. Welcome Page ExampleWelcome Page Example <html> <head><title>Welcome</title></head> <body> <h1 style="text-align:center; color:red"> Welcome Dear Visitor! </h1> </body> </html> welcome.html <web-app> <welcome-file-list> <welcome-file>welcome.html</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> web.xml
  • 29. Tomcat and Java ClassesTomcat and Java Classes • Tomcat uses Java classes you provide in order to run Servlets and JSP files - For example, the Servlets themselves! • Tomcat 5.x initialization scripts ignore your environment CLASSPATH variable • Classes are expected to be placed (or linked) at some predefined places in its directories
  • 30. Java Class LocationsJava Class Locations • Tomcat expects to find Java classes in class files (in a directory named classes) and JAR files (in a directory named lib) in the following places: • TOMCAT-HOME/common/ - Basic runtime classes. No need to touch this directory • $CATALINA_BASE/shared/ - Classes that are used by all the Web applications • $CATALINA_BASE/webapps/myApp/WEB-INF/ - Application-specific classes (Servlets are typically here)
  • 31. Java Class LocationsJava Class Locations
  • 32. Classes Provided by DBIClasses Provided by DBI In order to provide the classes you need, like ORACLE, SAX and DOM-related packages, the Tomcat-setup script links the directory $CATALINA_BASE/shared/lib/ to ~dbi/tomcat/shared/lib/, thus the latter packages are automatically known by your Tomcat server
  • 33. Tomcat 5.0 ManagerTomcat 5.0 Manager • Tomcat 5.0 comes with a Web application called “manager”, which supports functions for managing Web applications • You can either use the HTML interface at http://<machine>:<port>/manager/html/ or send direct HTTP requests to it • You will need to authenticate as a privileged user - Use the username “admin” with no password
  • 34. Tomcat 5.0 ManagerTomcat 5.0 Manager • Using the manager, you can - Deploy a Web application by posting a WAR file - Undeploy a deployed Web application - Start/stop a Web application (make it available/unavailable) - Reload an existing Web application (unpack new WARs) • Warning: while “stop” makes an application unavailable, “undeploy” deletes the application directory and WAR file from webapps/
  • 35. Tomcat and EclipseTomcat and Eclipse • You can use an Eclipse plugin for Tomcat Web- application development • The “Sysdeo Eclipse Tomcat Launcher” plugin is installed in CS • Using this plugin, you can start/stop the server, reload an application, etc. • Detailed explanations in the course home-page