may be added as a module. Some Web servers, such as Sun's Java Web Server (JWS),
W3C’s Jigsaw and Gefion Software’s LiteWebServer (LWS)
are implemented in Java
and have a built-in Servlet engine. Other Web servers, such as Netscape’s Enterprise
Server, Microsoft's Internet Information Server (IIS) and the Apache Group’s Apache,
require a Servlet engine add-on module. Examples of servlet engine add-ons are
Gefion Software's WAICoolRunner, IBM’s WebSphere, Live Software’s JRun and
New Atlanta’s ServletExec.
We will be using Tomcat4.0 for our Servlets. You’ll need to have JDK 1.3 installed
on your system in order for Tomcat 4.0 to work. If you don't already have it, you can
get it from java.sun.com.
Obtaining Tomcat 4.0
Tomcat 4.0 is an open source and free Servlet Container and JSP Engine. It is
developed by Apache Software Foundation’s Jakarta Project and is available for
download at http://jakarta.apache.org/tomcat, or more specifically at
http://jakarta.apache.org/site/binindex.html.
Choose the latest Tomcat 4.0 version. Once you have downloaded Tomcat 4.0,
proceed to the next step.Installing Tomcat 4.0Unzip the file to a suitable directory. In
Windows, you can unzip to C:\ which will create a directory like C:\jakarta-tomcat-
4.0-b5 containing Tomcat files.Now you'll have to create two environment variables,
CATALINA_HOME and JAVA_HOME. Most probably you'll have JAVA_HOME
already created if you have installed Java Development Kit on your system. If not then
you should create it. The values of these variables will be something like.
CATALINA_HOME : C:\jakarta-tomcat-4.0-b5 JAVA_HOME : C:\jdk1.3
To create these environment variables in Windows 2000, go to
Start -> Settings ->Control Panel -> System -> Advanced -> Environment Variables -> System variables
-> New. Enter the name and value for CATALINA_HOME
and also for JAVA_HOME if not already there.
Under Windows 95/98, you can set these variables by editing C:\autoexec.bat file. Just add the following lines and reboot your system :SET CATALINA_HOME=C:\jakarta-tomcat-4.0-b5SET
JAVA_HOME=C:\jdk1.3 Now copy C:\jakarta-tomcat-4.0-b5\common\lib\servlet.jar
file and replace all other servlet.jar files present on your computer in the
%CLASSPATH% with this file. To be on the safe side,
you should rename your old servlet.jar file/s to servlet.jar_ so that you can use them again if you get any error or if any need arises. You can search for servlet.jar files on your system by
going to Start -> Search -> For Files and Folders -> Search for Files and Folders named and typing
servlet.jar in this field. Then every servlet.jar file you find should be replaced by
C:\jakarta-tomcat-4.0-b5\common\lib\servlet.jar file.The idea is that there should by
ONLY ONE VERSION OF SERVLET.JAR FILE on your system, and that one
should be C:\jakarta-tomcat-4.0-b5\common\lib\servlet.jar or you might get errors
when trying to run JSP pages with Tomcat.
No comments:
Post a Comment