Web Servers (Structure and Deployment of Application) Unit-V
Web Servers (Structure and Deployment of Application) Unit-V
Web Servers (Structure and Deployment of Application) Unit-V
Introduction
A web server is a program that produces webpages in response to
requests from a web browser.
Web servers run the programs in response to user requests and return the
dynamic results to the web browsers.
Web servers can perform complex tasks like
Accepting a client request including arguments.
Running a program on the arguments and return results in the form of
HTML document.
Web application is a application running on a web server which allows
users for accessing through a client runs from a web browser.
Web browsers initiate network communications with servers by sending
them URLs.
All the communications between a web client and a web server use the
standard web protocol, HTTP i.e. in the form of HTTP commands.
2
.html
files
.jsp
files
Servlets
Servlets are commonly used with HTTP, hence the name HTTP Servlet
Servlets make use of Java standard extension classes in packages javax.servlet and
javax.servlet.http
Uses of Servlets:
Processes and stores data submitted by HTML form
Useful for retrieving and updating databases
Servlets working is based on Request-Response
Used in Cookies and session tracking
Cookies are a message given to a Web browser by a Web server. The browser
stores the message in a text file.
Session tracking keeps track of all previously accessed web pages
8
The Web Browser then sends the request to Web Server. The Web Server finds
the requested servlet
The obtained servlet gathers the relevant information by clients request and
builds a Web Page
10
Deployment of Servlets
11
JDSK
The Java Development Standard Edition Kit(JDSK) is
available from Sun Microsystems in order to develop
and deploy Java applications on desktop and servers
Installation : http://www.java.sun.com/j2se
After installation, important task is setting up of
environment variables
Steps: Control panel Click System Click Advanced
System Settings-Click Environment Variables
Set the path variable by mentioning the directory
C:\jdk1.06_4(your jdk directory)\bin.Click OK to save
settings.
Finally, go to cmd prompt and type javac
Tomcat Webserver