Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


A Quick Guide to Installing Tomcat on Windows  : Page 2

Get started using Java Server Pages (JSP) by installing the Open Source Jakarta Tomcat Servlet and JSP container.

Step 1: Install Tomcat
You can download Tomcat from the Jakarta Project's Tomcat download page. At this writing, the "production" version is Tomcat 3.2.3. The binary distribution (the download file) is a 3.1MB zip file named jakarta-tomcat-3.2.3.zip. There is no installation program—you just unzip the file. You can unzip the file anywhere, but I recommend that you create a directory dedicated to Tomcat. When you unzip the jakarta-tomcat-3.2.3.zip file, you will see the directories (see Figure 1).

bin You'll find a number of batch files here. This is where you start/stop the server using startup.bat and shutdown.bat. Some key environmental variables are also defined here. Finally, if you want to precompile your JSP pages, the jspc.bat file can simplify the process.
conf This directory contains all the configuration files for the server. The main configuration files are in XML. You may want to glance through the XML files to familiarize yourself with their content. The security permissions are also here in the file tomcat.policy.
doc You will find various documents in this directory such as the User's Guide, Tomcat security, and application development. The API documentation for Java Servlets is available as a separate download from Apache web site.
lib Several important Jar files are located here including servlet.jar, jaxp.jar, and webserver.jar. Tomcat relies on XML parsers because most of its configuration files are in XML. These jar files are added to your CLASSPATH when you start the Tomcat server.
logs Tomcat puts its log files in this directory. Servlet invocations are stored in servlet.log and JSP pages are logged in jasper.log. These files can be very helpful when debugging your applications.
src Source code for the server.
webapps Your application files are stored under this directory. I'll discuss the structure and the mechanics later in this article. As an application developer, you'll spend most of your time working in the webapps directory.
work Tomcat produces a number of temporary/working files, which are stored in this directory. For example, a JSP page first needs to be converted into a Servlet and then compiled. The Servlet source code and the class file produced by the compiler are stored in this directory. You should not delete items from this directory while the server is working. Sometimes it is helpful to look at the translated Servlet source code for debugging purposes.
The logs and work directories will not be there initially after you unzip the distribution file, but Tomcat creates them automatically the very first time you start it.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date