Start Here:

Information:
» Contact Sales
» Request Support
» Contact Info
» Ensim Demo

Resources:
» Tomcat Hosting
» Tomcat Info
» Forum

Legal Documents:
» Privacy Policy
» Terms of Service

» Credit Card Update:


Tomcat Java/JSP Hosting Information

Article Contents:
» Introduction
» JSP & Servlet Operation
» Deploying JSPs & Servlets
» Compiling Java Servlet Source Files

Top | Tomcat Welcome Page | Buy Now!

………………………………………………………

» Introduction

Note: The Java Virtual Machine (JVM) runs in shared mode on all of our servers, although restart options can be added upon request.

Ensim Pro supports Tomcat (v-4.1.18), developed by the Jakarta-Apache Project. Tomcat 4.1 implements the final released versions of the servlet 2.3 and JSP™ 1.2 specifications. As required by the specifications, Tomcat 4.1 also supports Web applications built for servlet 2.2 and JSP 1.1 specifications, with no changes. Additionally, the 4.1 servlet container (Catalina) provides greater flexibility and performance.

The Tomcat 4 package includes a set of tools designed to host Java™ Web applications. The package is shipped with the following:

  • Sun® Java 2 Standard Edition (J2SE) development environment version 1.4, which includes J2SDK™ 1.4.2_06 and JRE (installed in "/usr/java/j2sdk1.4.2_06/" and "/usr/java/j2sdk1.4.2_06/jre/" respectively)
  • Apache 2
  • mod_jk 1.3
  • Tomcat 4.1.18, installed in /var/tomcat4
  • Database driver for MySQL installed in "/var/tomcat4/common/lib/mysql-connector-java-3.1.12-bin.jar for MySQL
  • Tyrex, installed in "/var/tomcat4/common/lib/tyrex-0.9.7.0.jar"
  • JNDI™, installed in "/var/tomcat4/common/lib/jndi.jar"
  • Mail, installed in "/var/tomcat4/common/lib/mail.jar"
  • Top | Tomcat Welcome Page | Buy Now!

    » JSP & Servlet Operation

    Ensim Pro (with the mod_jk module) has JSP and servlet functionality enabled on the Apache Web server. The Tomcat engine executes JSP and servlets. Once Tomcat is enabled for a site, Ensim Pro instructs the Web server to send certain requests to Tomcat for processing. Tomcat requires an execution environment known as context, to be set up before it can execute JSPs and servlets properly.

    A context is a directory structure on the server from which Tomcat can execute servlets and JSPs. Ensim Pro automatically sets contexts for you. You can also add a new context by uploading Java Web archive files (with the extension ".war") into Web content directories. We do not support Web archives.

    Top | Tomcat Welcome Page | Buy Now!

    » Deploying JSPs & Servlets

    Deploying JSPs and servlets on Ensim is as easy as uploading a Web site using any FTP client. When Tomcat is enabled for a site using the Appliance Administrator interface, Ensim Pro creates a default Tomcat context, for the virtual site in the Web directory. The context path of each virtual site is "/home/virtual/domainname/var/www/html/".

    A new directory called WEB-INF is created in this directory. The WEB-INF directory contains some configuration information for Tomcat and a directory in which servlet class files are placed for deployment.

    As long as the file extension of the JSP file is ".jsp", the Site Administrator can simply load a JSP page in the directory "/var/www/html/", and the Web server automatically passes it on to Tomcat for processing.

    For example, if you have a file named "test.jsp", the Site Administrator can use an FTP client to upload the file in the directory "/var/www/html/". You can then access the dynamic JSP page through http://‹site name›/test.jsp. The first time you access this page, Tomcat takes a few seconds to compile the page but subsequent accesses are much quicker. Compiling a servlet source Java file creates a servlet class file. Deploying a servlet on Ensim Pro includes uploading the servlet class file in "/var/www/html/WEB-INF/classes/".

    For example, if you have a file named "test.class", you would use an FTP client to upload the file in "/var/www/html/WEB-INF/classes/". The servlet is executed through http://‹site name›/servlet/test.

    Top | Tomcat Welcome Page | Buy Now!

    » Compiling Java Servlet Source Files

    You can develop servlets manually through the command line and a text editor. Ensim Pro provides Java software development kit and Java run time environment for the Site Administrator. It installs a file "java.sh" in "/etc/profile.d/". When you log on to the server, your shell sources this file and some relevant Java-environment variables are set up for you. You can add additional "$CLASSPATH", for any site, by editing the file "java.sh".

    To compile a Java servlet source file into a Java class file for Tomcat:

    1. Log in to SSH as Site Administrator.
    2. Change to the directory in which the source servlet code file is located.
    3. Enter the following command: "javac myServlet.java" (Substitute your file name for the file myServlet.java). If the compilation is successful and no errors are reported, the file "myServlet.class" can be located in the same directory.
    4. To use this servlet, copy the file "myServlet.class" in the "WEB-INF/classes" directory.

    Top | Tomcat Welcome Page | Buy Now!


    Announcements

    » Happy Holidays from FuturePoint

    » Battle Against Spam

    » Hosting Service Upgrades

    » New Billing System Launched

    » Happy Holidays & Upgrades

    » Scheduled Network Maintenance

    » New Community Forums & FAQ

    » Hosting Service Upgrades

    » New Data Center Migration

    » Future Point Inc. Acquires Nox Hosting

     

    Copyright © 2001-2005 Future Point Inc., All Rights Reserved
    For more information, please contact FuturePoint via the Client Help Desk.