Tomcat 4/JSP Getting Started

  Catalina Servlet engine with the emergence of so-called Tomcat fourth enhance its performance, makes it a worthy of consideration Servlet / JSP container.    However, can help you begin to understand the document Tomcat resources are few, only a few books, but also in Jakarta some of the information on the Web site is not very clear. 

  Let us step by step understanding of the installation process Tomcat, and then discuss the use of some of the functions of Tomcat 4/JSP to construct Web applications. 

  What is the Tomcat? 

  Tomcat is an open-source operating servlet and JSP Web application software is Java-based Web application software containers.    Apache Tomcat from Jakarta sub-supported by the open source code from the Java community volunteers for maintenance.    Tomcat Server servlet and JSP is based on the implementation of the norms, we can say Tomcat Server also introduced Apache-Jakarta standards than most commercial applications and the server software is better. 

  Installation of Tomcat 4 

  To start using Tomcat 4, you at least want to download Java Development Kit (JDK) version 1.2 and Tomcat 4 install They are ZIP files and the Windows installation data packets.    Once you have installed these two data packets, you must add two environment variables: JAVA_HOME and TOMCAT_HOME.    JDK will be installed in JAVA_HOME directory, and Tomcat TOMCAT_HOME 4 will be installed in the directory. 

  If it is installed through the Windows installation procedures, then you can use the menu option to start Tomcat, or open up a command prompt window, entered TOMCAT_HOME \ bin directory, run startup.bat / sh document.    Then open a browser and enter the URL http://localhost:8080.    Tomcat the default pages will appear in your eyes. 

  Web applications primer 

  Before we proceed, we have to look at a Web application software includes components.    Java Servlet specification Web application software defined as servlets, HTML pages, and other categories from a number of marketing in the number of containers on the resources tied up and run a set.    In Tomcat, these resources have been placed in the TOMCAT_HOME \ webapps folder following a special directory structure.    For a sample Web application software (myapp), the directory structure is this: 

  TOMCAT_HOME \ webapps \ myapp \ WEB-INF \ classes \ lib 

  Myapp directory is regarded as Web application's root directory, all the JSP, HTML, JavaScript documents and other resources are located in the directory under.    WEB-INF directory contains application software used by the resources, but the WEB-INF not in the public file in the root directory.    In this directory contained in the document can not be asked by the client visit.    Directory category (under WEB-INF) contains the necessary operation myapp servlets, beans and utility category.    In some cases (log4j), attributes documents were placed in the category of the directory.    Lib directory (under WEB-INF) includes Java archive files (JARs), such as JDBC driver or tag library, which is myapp rely on.    If a class appears in the JAR file and in the category of the directory, type loader will be recorded in that category in a directory. 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • Facebook
  • DotNetKicks
  • DZone
  • Netvouz
  • Propeller

Tags: ,

Releated Java Articles

Comments

Leave a Reply