Tomcat Server

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    Tomcat Server - Presentation Transcript

    1. Of Tomcat s and JBoss es
    2. What’s in store…
      • Getting started
      • Configuring Tomcat
      • Web application deployment
      • Integrating with Apache
      • Tomcat security
      • Configuration files
      • JBoss 4.2 server structure
      • JBoss server profiles
      • Deploying in a JBoss server
      • … ..
    3. O R I G I N S
      • In 1999 Sun donated its servlet container to Apache S/w Foundation
      • Combined with the Apache web-server
      • A new servlet and JSP specification leads to a new Tomcat version
      • 2001 - Tomcat Catalina, fully-redesigned, is released. Version 4.x
      • 1999 – JBoss server released
      • Both are available as open-source
    4. Tomcat – A Bird’s View
      • Servlet containers handle requests for service by…
      • Creating a request object and populating it with appropriate information
      • Creating a response object that can be used to produce the response to the requester
      • Calling a service method to translate the request object data to the response object
    5. Tomcat - F R A M E W O R K Tomcat - Server AJP Connector 8080 SSL Connector 8080 Coyote Connector 8080 Service Engine – Catalina Host Context Servlet JSP Logger Valve Valve Valve Realm
    6. Tomcat - F R A M E W O R K
      • Consists of Components
      • Containers – components which contain other components
      • Nested components – components which can’t contain other components
      • Server an instance of Tomcat web application server
      • Service manages connectors between client and server components
      • Connectors represent points at which requests are received and assigned to a port
      • Engine represents Catalina Servlet engine
        • Examines HTTP headers and determines contexts
        • Over-ridden when Tomcat is part of other Web/App server
      • Realm manages authentication and authorisation
      • Valves intercept requests and do pre-processing. Eg. – Single sign-on
    7. Tomcat - F R A M E W O R K
      • So basically …
      • Tomcat is the web server
      • Catalina is the servlet container in Tomcat
      • Catalina has two main modules:
        • A connector to connect the request to the container. It constructs the request object and the response object.
        • A container, which actually services the request.
    8. Getting S T A R T E D with Tomcat
      • http://tomcat.apache.org/download-xx.cgi
        • xx – major version + minor version
      • Best to download the ZIP archive
      • Running Tomcat
        • bin/startup.[bat/sh]
      • Stopping Tomcat
        • bin/shutdown.[bat/sh]
    9. C O N F I G U R I N G Tomcat
      • conf/server.xml – the starting point
      • Change all ports – HTTP(S), Shutdown, AJP
      • Web application security – users, passwords & roles managed by Realm
      • Using with another web server like Apache
      • Specifying JNDI resources in Engine
      • Enable access logs
      • bin/catalina.bat – specifying JVM parameters and arguments
      • conf/web.xml – default options for all web applications
    10. A H – H A H Moment
      • So, Why can’t you run multiple Tomcats on the same machine? What if have to ?
    11. Tomcat A D M I N
      • Host-manager web application should be deployed
      • Roles, usernames and passwords present in conf/tomact-users.xml
      • Access http://localhost:8080 and click on Manager
      • Deployment of web applications can be done remotely
    12. D E P L O Y I N G Web Application
      • Can be done manually or automagically
      • Not to forget – through Eclipse !
      • Manual – place the *.war file within the ‘ webapps ’ folder
      • Automagic – use the Admin console to deploy the *.war
      • Eclipse – add new server, deploy application onto server
    13. Web Application Layout
      • sample_webapp/
        • xxx.html
        • yyy.jsp
        • zzz.other resources
        • WEB-INF/
          • web.xml
          • classes/
            • Java class files
          • lib/
            • jars and zips of class files
    14. L O A D B A L A N C I N G Tomcat Tomcat Tomcat Tomcat R E Q U E S T S Apache Web Server Tomcat Cluster
    15. L O A D B A L A N C I N G
      • Deploy particular web application on Tomcats
      • Tomcats behind Apache web server
      • Apache web server –
        • httpd.conf – load Tomcat application
        • Create worker.properties file
        • Each worker should point to IP & port of particular Tomcat machine
      • Tomcat servers –
        • Modify server.xml – add ‘jvmRoute’ to ‘Engine’ tag
        • Each jvmRoute should be the name of the corresponding Apache worker
    16. S E C U R I N G the system!
      • Did someone say Windows?
      • Close unwanted open ports
      • Block private and internal ports:
        • Control port: 8005
        • Connector port: 8009
        • Anything else you don’t need.
        • Tomcat usually runs on 8080, so leave it open
        • If you have Apache running, you’ll need port 80 open, as well
    17. C O N F I G U R A T I O N Files
      • server.xml
        • The main configuration file.
      • web.xml
        • Configures servlets and web applications
      • tomcat-users.xml
        • Roles, users, and passwords
      • catalina.bat
        • Runtime JVM parameters
    18. References
      • Tomcat Presentation - Harry R. Erwin, PhD, University of Sunderland
      • Load balancing Tomcat w/ Apache HTTP Server 2.x w/ mod_proxy
      • Professional Apache Tomcat 5 – Vivek Chopra, Amit Bakore, Jon Eaves, Ben Galbraith, Sing Li, Chanoch Wiggers
      • Wikipedia
    19.  

    + anirvan.majumdaranirvan.majumdar, 4 months ago

    custom

    430 views, 3 favs, 0 embeds more stats

    The internals of Tomcat and how to configure and cu more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 430
      • 430 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories