From Twitter

SERVLET PROGRAMMING HOW TO INSTALL SERVLET ENGINE/WEB

SERVLET PROGRAMMING 
   
We have already know core Java and how to compile and learn the Java
programs.  we shall cover the basics of Java Servlet and different interfaces


of Servlet. Java Servlets are the small, platform-independent

Java programs that runs in a web server or application server and provides server-side processing such as
accessing a database and e-commerce transactions. Servlets are widely used for web
processing. Servlets are designed to handle HTTP requests (get, post, etc.) and are the
standard Java replacement for a variety of other methods, including CGI scripts,
Active Server Pages (ASPs). Servlets always run inside a Servlet Container. A Servlet
Container is nothing but a web Server, which handles user requests and generates
response. Servlet Container is different from Web Server because it is only meant for
Servlet and not for other files (like .html etc). In this unit, we shall also see how the
Servlet Container is responsible for maintaining lifecycle of the Servlet. Servlets
classes should always implement the javax.servlet.Servlet interface. This interface
contains five methods, which must be implemented. We shall learn how these
methods can be used in Servlet programming and how Servlet and JDBC combination
has proved a simple elegant way to connect to database     

HOW TO INSTALL SERVLET ENGINE/WEB
SERVER   
     
A Servlet is a Java class and therefore needs to be executed in a Java VM by a service
we call a Servlet engine. This Servlet engine is mostly contained in Servlet Engine or
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.3Now 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

Labels

(MCS-031 (6) 2011 (5) 4nf (1) 5nf (1) ACCESS CONTROL In Relational Database (1) ALGORITHMICS (5) assignment 2014 2015 (1) AVAILABLE TOOLS & ALGORITHMS (5) BCA (1) BINARY SEARCH (1) Block Nested Loop Join (1) Build and Fix Model (1) BUILDING BLOCKS OF ALGORITHMS (1) CHARACTERISTICS OF AN ALGORITHM (2) Core Java (1) Data Communication Network Security (1) DATABASE SECURITY (1) EER tool (1) ELEMEMTARY ALGORITHMICS (2) ENHANCED ER TOOLS (1) EVOLUTION (1) EXAMPLE OF AN ALGORITHM (2) Indexed Nested-Loop Join (1) install servelet engine (1) INTRODUCTION (1) Iterative Enhancement Model (1) Java Server Pages (1) JDBC (1) JSP (2) LEVELS OF DATABASE SECURITY (1) MCA (9) MCA 051 (1) MCA 3rd Semester (8) MCA 4th Semester (1) MCA 5 sem (1) MCS-031 (7) MCS-031 : DESIGN AND ANALYSIS OF ALGORITHM (14) MCS-032 (1) MCS-033 (1) MCS-034 (2) MCS-035 (1) mcs-041 (2) MCS-042 (1) mcs-043 (2) mcs-052 solved assignment (1) MCSL-036 (2) Nested loop join (1) OBJECTIVES (1) Operating System (2) OUTLINE OF ALGORITHMICS (1) Principles of Management and Information Systems (1) PROBLEMS (1) QUERY PROCESSING AND EVALUATION (1) Query processing Optimisation (1) Question Papers (8) Related Topic (9) relational Database (1) SELECT OPERATION Query Processing (1) Servlet (1) Servlet Programme (1) Servlet Programming (1) SOFTWARE DEVELOPMENT MODELS (4) SOFTWARE ENGINEERING (4) Solution (7) Solved Assignment 2013 2014 (6) SOME PRE-REQUISITES AND Asymptotic Bounds ASYMPTOTIC BOUNDS INTRODUCTION (1) STATISTICAL DATABASE SECURITY (1) structure (1) SUMMARY (1) Waterfall Model (1) Write a C program to print the following triangle (1)