APACHE TOMCAT WEB SERVER TECHNICAL SEMINAR ON APACHE TOMCAT WEB SERVER
Introduction Apache Tomcat (or Jakarta Tomcat or simply Tomcat) is an open source servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServerPages (JSP) specifications from Sun MicroSystems.
Components CATALINA COYOTE JASPER Catalina is Tomcat's servlet container In Tomcat, a Realm element represents a "database" of usernames, passwords, and roles (similar to unix groups) assigned to those users. COYOTE Coyote is Tomcat's HTTP Connector component that supports the HTTP 1.1 protocol for the web server or application container. JASPER Jasper is Tomcat's JSP Engine.
HOW TO INSTALL APACHE TOMCAT WEB SERVER?
Tomcat Home Page
Tomcats Download Page
First Display of setup Wizard
Choosing Features of Tomcat
Choosing Installing Location
Choosing Port Number ,User Name
Choosing the JVM
Configure Tomcat
FEATURES Implements the Servlet 2.4 and JSP 2.0 specifications Reduced garbage collection, improved performance and scalability Native Windows and Unix wrappers for platform integration Faster JSP parsing
Tomcat directory structure myApplicationDirectory/ -- this is your top level directory myWebForm.html myJspPage.jsp WEB-INF/ -- must have this directory, named exactly like this lib/ -- mostly for external .jar files classes/ -- must have this directory, named exactly like this com/ -- The com.example.model package directory example/ model/ myModel.class -- in package com.example.model; web/ myServlet.class --in package com.example.web; web.xml -- this is the deployment descriptor, it must have this name
web.xml <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet> <servlet-name>Some internal name</servlet-name> <servlet-class>com.example.web.MyServlet</servlet-class> </servlet> <servlet-mapping> <url-pattern>/NameSeenByUser.do</url-pattern> </servlet-mapping> </web-app>
Flow The user submits an HTML form Tomcat finds the servlet based on the URL and the deployment descriptor (web.xml) and passes the request to the servlet. The servlet computes a response and writes an HTML page containing the response. Tomcat returns the HTML page to the user.
Alternatives to Tomcat Sun’s Java Web Server Old, no longer being developed, all in Java Java Web Server Development Kit (JWSDK) Official reference implementation Difficult to install and configure JBoss Open source Opinions vary on how easy it is to install Comes with built-in database
REFERENCES http://www.ccl.net/cca/software/UNIX/apache/ tomcat3.1b1-faq.html, READMET1SB.shtml, solaris-t3.2/README.shtml http://www-itg.lbl.gov/Private/apache_build.html http://www-itg.lbl.gov/Grid/projects/WebServer-SG.html https://idcg-ca.lbl.gov
THANK YOU