Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Appachetomacat server-course-navi-mumbai-appache-tomcat-course-providers-navimumbai


Published on

apache-tomcat classes-navi-mumbai,apache-tomcat course-provider-navi-mumbai apache-tomcat-training-navi-mumbai best apache-tomcat classes-navi-mumbai
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Appachetomacat server-course-navi-mumbai-appache-tomcat-course-providers-navimumbai

  1. 1. Vibrant Technologies & Computers Apache Tomcat Make Career With Us!! B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  2. 2. 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) B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  3. 3. A 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>"); } http://localhost/dbi/hello B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 }
  4. 4. A JSP Example <html> <head> <title>Hello World</title> </head> <body> <h2><%= new java.util.Date() %></h2> <h1>Hello World</h1> </body> http://localhost/dbi/hello.jsp </html> B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  5. 5. The Apache Jakarta Project • The Apache Jakarta Project “creates and maintains open source solutions on the Java platform for distribution to the public at no charge” • Apache Jakarta Tomcat--or just “Tomcat”--is one of those projects • Tomcat is a container for servlets – Tomcat can act as a simple standalone server for Web applications that use HTML, servlets, and JSP – Apache is an industrial-strength, highly optimized server that can be extended with Tomcat B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  6. 6. Getting Tomcat • The Apache Jakarta website is hard to navigate • If you want to get Tomcat, one reasonable download site is • You would need the whole “tarball”, which will have a name such as jakarta-tomcat-5.0.29.tar.gz • An excellent tutorial site is Configuring & Using Apache Tomcat, – This site also contains many examples you can use to test your installation • Installing Tomcat by itself is much easier than installing Apache and then adding Tomcat to it B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  7. 7. Another 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> http://localhost/dbi/numbers.jsp B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  8. 8. Tomcat Directory Structure Tomcat-Base conf logs webapps server server.xml ROOT myApp1 work myApp2 shared lib classes WEB-INF web.xml lib classes Tomcat-Home bin common B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 lib classes
  9. 9. Base 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 B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  10. 10. 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 B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  11. 11. Where to Get More Information Vibrant Group: Vibrant Technologies & Computers in Vibrant HR Team B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173