Curso Apache Tomcat Administration Workshop
32 horasVisão Geral
Curso Apache Tomcat Administration Workshop, cobre os detalhes de instalação e configuração do Tomcat Web Server. Você aprenderá os detalhes do arquivo de configuração server.xml, uma visão geral das páginas Servlet e JavaServer, uma comparação do Tomcat com os servidores de aplicativos J2EE, os diretórios de instalação do Tomcat, implantação de aplicativos Java Web, o arquivo web.xml, válvulas, registro, domínios de segurança, conectando o Tomcat ao Apache Web Server, hospedando vários sites da Web, problemas de desempenho e escalabilidade, teste de carga, clustering, monitoramento, o Tomcat Manager e a ferramenta Tomcat Administration.
Objetivo
Após realizar este Curso Apache Tomcat Administration Workshop você será capaz de:
- Explicar como o Tomcat se relaciona com o Java EE (J2EE)
e se compara a outros servidores de aplicativos (por exemplo, JBoss)
- Instale e configure o Tomcat em ambientes do tipo Windows
e UNIX
- Implantar, oferecer suporte e solucionar problemas de
aplicativos no Tomcat
- Navegue pela estrutura de diretórios do Tomcat
- Entenda a arquitetura e os arquivos de configuração do
Tomcat: server.xml, context.xml, .properties, etc.
- Entenda a estrutura e configuração do aplicativo da web:
web.xml
- Tomcat seguro e aplicativos em execução nele
- Configurar o Tomcat para SSL
- Ajustar o desempenho do Tomcat
- Explore diferentes estratégias de balanceamento de carga
e alta disponibilidade com Tomcat, incluindo afinidade de servidor por meio de
sticky sessions, bem como replicação de sessão via Tomcat
- Agrupamento
Publico Alvo
- Administradores de servidores Web/Aplicativos que precisam instalar, configurar, executar e ajustar o servidor de aplicativos Apache Tomcat.
Pre-Requisitos
- Regras básicas de XML (ou seja, poder editar arquivos
XML)
- Protocolo HTTP (ou seja, a natureza sem estado do HTTP, a
necessidade de sessões, métodos HTTP, SSL, etc.)
- Ambientes Java (por exemplo, configurações de memória, coleta
automática de lixo, JDBC)
- Outros servidores de aplicativos Java EE (J2EE) e conceitos básicos por trás dos aplicativos da Web Java
Materiais
Inglês/Português/Lab PráticoConteúdo Programatico
Intro to JavaEE
- Overview
- Relationship to Tomcat
- Standards vs implementation
- Servlets/JSPs
- Overview
- Life-cycle
- Advantages
- Role of the application server (i.e. servlet container)
- Comparison to other web technologies
- Model-view-controller (MVC) design pattern
- Quick overview
- Impact on application design and troubleshooting
Apache Tomcat Overview
- Background of Tomcat
- Apache Software Foundation
- Tomcat project
- Tomcat licensing
- Uses of Tomcat in the real world
- Versions of Tomcat
- Future direction for Tomcat
- Alternative distributions of Tomcat
Installing Apache Tomcat
- Installing Java
- Getting Java
- Java SE vs. Java EE
- JDK vs. JRE
- Installing on Unix/Linux/Windows
- Getting Tomcat
- Pre-built binary release
- Using vendor-supplied pre-compiled release
- What do download?
- Life-cycle management
- Which scripts to run?
- Running in background vs. foreground
- Understanding the shutdown process
- Running Tomcat as a system service
- Installing Tomcat as a NT sevice on Windows
- Running Tomcat with jsvc on Unix/Linux
- Using SysV framework to manage auto-start/shutdown
Tomcat Directory Structure
- The bin/ directory
- The lib/ directory (libraries on Tomcat pre-v6: shared/,
common/, server/)
- Class loading on Tomcat
- The conf/ directory
- The context directories
- The webapps/ directory
- The temp/ directory
- The logs/ directory
- The work/ directory
- Running multiple Tomcat instances off the single
installation
- CATALINA_HOME vs. CATALINA_BASE
Tomcat Architecture and Configuration
- Tomcat architecture: the big-picture
- Overview of XML
- Overview of Tomcat conf/server.xml file
- Walk through the Tomcat component hierarchy
- The “Server” element
- Configuring the shutdown port
- The “Connector” element
- Overview of connectors
- Configuration
- Tuning
- Understanding thread pooling
- Overview
- Understanding background threads
- Overview
- Configuration
- Virtual hosting on Tomcat
- The “Alias” element
- Overview
- Configuration
- Overview
- Configuration
- Overview
- Overview
- Extending Tomcat
- Logging on Tomcat
- Default system logging
- Using Log4J
- Access Log Valve
- Request Dumper Valve
Deployments and Web Apps on Tomcat
- Directory structure of web apps
- Class-loading revisited
- The WEB-INF/web.xml deployment descriptor
- Common elements
- Defining and mapping Servlets and Filters
- Initializing web apps
- Session configuration
- Welcome file list
- Error pages
- Resources
- JNDI entries
- Web Archives (i.e. .war files)
- Overview
- Creating
- Deploying
- Pros/cons
- Tomcat’s conf/web.xml file
- Static file handling
- Performance implications
JSP handling
- Overview
- Memory/performance implications
- Tuning
- Pre-compiling JSPs
- Default MIME-types
- Default session config
- Default welcome file list
Monitoring and Management on Tomcat
- Tomcat Manager application
- Overview
- Accessing
- Features
- Starting and stopping applications
- Deployments and un-deployments
- Automation with non-HTML mode
- Using w-get (i.e. command-line)
- Ant Integration
- Monitoring
Java Management Extensions (JMX) on Tomcat
- Overview
- Architecture
- Tomcat MBeans
- JMX Proxy Servlet
- Run-time monitoring and management of the entire server
- Automation with Ant
JConsole
- Overview
- Connecting to Tomcat
- JVM Monitoring
- MBeans support
Managing Resources on Tomcat
- Overview of JNDI
- Resources and JNDI on Tomcat
- The “Environment” Element
- Global vs. local resources
- The role of deployment descriptors
JavaMail on Tomcat
- Overview
- Adding support to Tomcat
- Configuring JavaMail as a Tomcat resource
- Database Integration on Tomcat
- Overview of JDBC: API vs. drivers
- Overview of Database Connection Pools (DBCP)
- Configuring DBCP resources on Tomcat with MySQL
- Handling connection pool leaks
Tomcat Security
- Security of Tomcat
- The shutdown command
- Running on privileged ports
- jsvc
- TCP Port Relaying
- User and directory permissions
- Running with the Security Manager
- Overview
- Java Permissions and grants
- Tomcat’s policy file
- Customizing policies
- Pros and cons of the security manager
- Securing applications running on Tomcat
- Using valves for access control
- Address vs Host valve
Authentication and Authorization
- Overview of container-managed security
- When to use?
- A look at Manager app security
- Requiring authorized users
- Authentication options
- Basic vs. form authentication
Realms
- Overview
- Types of realms
Using DataSource realm
- Overview of JNDI realm
- Protecting privacy of passwords
- Combining realms
- Lock-out realms
SSL/TLS on Tomcat
- Overview
- SSL Certificates
- Configuring SSL connector
- Requiring the use of SSL in applications
Tomcat Performance Tuning
- Java/JVM tuning
- Heap sizing
- Garbage collection policies
- HotSpot JIT compilers
- Scaling
- Approaches
- Tomcat tuning
- Connectors
- JSPs
- Sessions
- Scaling
High Availability (HA) and Scalability of Tomcat
- Fronting Tomcat with Apache
- Overview
- Pros/con
- AJP vs. HTTP
- mod_jk vs. mod_proxy_ajp
- Using mod_jk
- Compiling/Installing
- Configuring
- Monitoring
- Load Balancing
- Benefits and issues
- Server-affinity (sticky sessions)
- Pros/cons
- Sharing sessions via persistent manager
- Pros/cons
- Session-replication
- Clustering on Tomcat
- Architecture
- Configuration
- Monitoring
- Pros/cons
- Massive-scaling with cluster groups