0% found this document useful (0 votes)
15 views78 pages

Unit 1 IT

Uploaded by

Mukesh Bathre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views78 pages

Unit 1 IT

Uploaded by

Mukesh Bathre
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 78

WELCOME

YOU
ALL
01/20/25 Prepared by: Mukesh Bathre Slide 1
Subject : Web Technologies

Subject Code : IT 604

No of Lectures : 60

Theory Paper : Max Marks-100,

Minimum Marks-35

Practical Lab : Maximum Marks-50

Minimum Marks-25

Internal Assessment: Mid Term-20, Term Work-30

Syllabus follows from the next slide……………


01/20/25 Prepared by: Mukesh Bathre Slide 2
Web Technologies
UNIT - 1
History of the Internet, internetworking concepts, architecture, and
protocol: switch, router, protocols for internetworking, internet
address and domains. Introduction World Wide Web (WWW),
working of web browser and web server, Web server and its
deployment, N-tier architecture, services of web server, Common
gateway interface (CGI), Uniform Resource Locator (URL), format of
the URL, Hyper Text Transfer Protocol (HTTP), feature of HTTP
protocol HTTP request-response model, Hyper Text Transfer Protocol
Secure (HTTPS).

01/20/25 Prepared by: Mukesh Bathre Slide 3


Web Technologies
UNIT- 2
Introduction to Hyper Text Markup Language (HTML), HTML
elements, XHTML syntax and Semantics, extensible Markup
Language (XML), element, attributes, entity declarations. DTD files
and basics of Cascading Style Sheet (CSS).Document object Model
(DOM) history and levels, Document tree, DOM event handling.

UNIT- 3
Introduction to Java Script, Basic concepts, variables and data types,
functions, conditional statements, Loops, Operators, Arrays,
Standard Objects and form processing in Java Script.

01/20/25 Prepared by: Mukesh Bathre Slide 4


Web Technologies
UNIT – 4
Evaluation of Web Applications, type of Web Documents, feature of
Web Pages, Multitier Web Applications, Introduction to Apache Web
Server. Security in Application: Authentication, Authorization,
Auditing, Security Issues, Security on the Web, Proxy Server,
Firewall. Middleware Concepts, CORBA, Java Remote Method
Invocation (RMI) , Message Oriented Middleware (MOM), EJB,
Microsoft’s Distributed Component Object Model (DCOM) Web
Servers HTTP request types System Architecture Server side
Scripting. Web Server and its Deployment, Web Client, Services of
Web Server, Mail Server, Proxy Server, Multimedia Server.

01/20/25 Prepared by: Mukesh Bathre Slide 5


Web Technologies
UNIT – 5
Introduction to Servlet, Overview Architecture Handling HTTP
Request, Get and Post request, Redirecting request Multi-tier
Applications. Introduction to JSP, basic JSP, Java Bean class and JSP.
Setting up an Open Data Base Connectivity (ODBC) data source.

01/20/25 Prepared by: Mukesh Bathre Slide 6


What do you mean Web Technology?
Web: Web is simply a network of device to transfer information from one
device to another.
Technology: Technology is the application of scientific knowledge for
practical purposes, esp. in industry: "computer technology"; "recycling
technologies“ etc.
(Web + Technology)
Web technology is the development of the mechanism that allows two of
more computer devices to communicate over a network. It is to understand
the rules for success on that new platform; Web-building technologies,
including W3C standards like HTML, XHTML, CSS, XML and other
technologies like JavaScript, PHP, ASP, SQL and much more to the Internet
as platform, and an attempt to understand the rules for success on that
new platform.

01/20/25 Prepared by: Mukesh Bathre Slide 7


What is Web Application?
A Web Application is an application that is accessed over a network such
as the Internet or an intranet. The term may also mean a computer
software application that is coded in a browser-supported language (such
as JavaScript, combined with a browser-rendered markup language like
HTML) and reliant on a common web browser to render the application
executable.

Web applications are popular due to the ubiquity of web browsers, and the
convenience of using a web browser as a client, sometimes called a thin
client. The ability to update and maintain web applications without
distributing and installing software on potentially thousands of client
computers is a key reason for their popularity, as is the inherent support
for cross-platform compatibility. Common web applications include
webmail, online retail sales, online auctions, wikis and many other
01/20/25
functions. Prepared by: Mukesh Bathre Slide 8
Categories of Web Applications
Web applications are categorized depending on their development history
and their degree of complexity as given below:

1. Document Centric 6. Portal oriented


• Static Homepage, • Community Portal,
• Web Radio, • Online Shopping Mall,
• Company Web Site. • Business Portal.
2. Interactive 7. Ubiquitous
• Virtual Exhibition, • Customized Services,
• News Site, • Location Aware Services,
• Travel Planning. • Multi Platform Delivery.
3. Transactional 8. Semantic
• Online Banking, • Knowledge Management,
• Shopping, • Syndication,
• Booking System. • Recommender System.
4. Workflow based 9. Social
• E-Government, • Web Logs,
• B2B Solution. • Collaborative Filtering,
5. Collaborative • Virtual Shared Workplace.
• Chat room,
• E-Learning Platform,
• P2P-Services).

01/20/25 Prepared by: Mukesh Bathre Slide 9


Categories of Web Applications

01/20/25 Prepared by: Mukesh Bathre Slide 10


What is Web Development?
Web development is a broad term for the work involved in developing a
web site for the Internet (World Wide Web) or an intranet (a private
network). This can include web design, web content development,
client liaison, client-side/server-side scripting, web server and
network security configuration, and e-commerce development.

However, among web professionals, "web development" usually refers to


the main non-design aspects of building web sites: writing markup and
coding. Web development can range from developing the simplest static
single page of plain text to the most complex web-based internet
applications, electronic businesses, or social network services.

01/20/25 Prepared by: Mukesh Bathre Slide 11


What is Internet?
• A network of networks, joining many government, university and private
computers together and providing an infrastructure for the use of E-mail,
bulletin boards, file archives, hypertext documents, databases and other
computational resources
• The vast collection of computer networks which form and act as a single
huge network for transport of data and messages across distances which
can be anywhere from the same office to anywhere in the world.
• The largest network of networks in the world.
• Uses TCP/IP protocols and packet switching .
• Runs on any communications substrate.

01/20/25 Prepared by: Mukesh Bathre Slide 12


What is Internet?

01/20/25 Prepared by: Mukesh Bathre Slide 13


History of Internet
1969 – Defense Advanced Research Project Agency
(DARPA) creates ARPANET
 Internet project creates protocols (TCP/IP)
o Transmission Control Protocol (TCP)
o Internet Protocol (IP)
o Allows computers to talk over networks
o Creates the “Internet” – 4 nodes
 Links together DARPA supported sites

1979 – USENET started


 Interconnection of Computer Science Departments
o Duke and UNC-Chapel Hill
 First emoticon created
o -) (tongue in cheek)
o 1982 :- ) and :- ( get added

01/20/25 Prepared by: Mukesh Bathre Slide 14


History of Internet
 1985 – First domain name – Symbolics.com
 1986 – NSFNET
 government support for major Internet backbone
 in 1990, becomes backbone of modern Internet when
ARPANET is decommissioned
 Completely privatized by 1995
 56 K interconnection initially, increased rapidly
 1988 – Internet Worm affects 6,000 of 60,000
Internet sites
 30 seconds on NBC evening news
 Son of National Security Agency Chief Scientist

01/20/25 Prepared by: Mukesh Bathre Slide 15


History of Internet
 1991 – World Wide Web released by CERN
 First Web Server
WhatYouSeeIsWhatYouGet (WYSYWIG)
 First Web Site
(Stanford Linear Accelerator)
 1992 – 50 Web servers
 1993 – First Internet
Worms/Spiders/Wanderers/Robots
 First search engines
 Mosaic – first graphical browser for Web
 341,000% growth rate in WWW

01/20/25
Time-Line of Internet
Prepared by: Mukesh Bathre Slide 16
Growth of Internet

1000000000
Number of Hosts on the Internet

100000000

10000000

1000000

100000

10000

1000

100
Aug-81

Aug-83

Aug-85

Aug-87

Aug-89

Aug-91

Aug-93

Aug-95

Aug-97

Aug-99

Aug-01
01/20/25 Prepared by: Mukesh Bathre Slide 17
What Is an Internetwork?
An internetwork is a collection of individual networks, connected by
intermediate networking devices, that functions as a single large
network. Internetworking refers to the industry, products, and
procedures that meet the challenge of creating and administering
internetworks.
Figure: Different Network Technologies Can Be Connected
to Create an Internetwork illustrates some different kinds of
network technologies that can be interconnected by routers and
other networking devices to create an internetwork.

01/20/25 Prepared by: Mukesh Bathre Slide 18


01/20/25 Prepared by: Mukesh Bathre Slide 19
History of Internetworks
 The first networks were time-sharing networks that used mainframes
and
attached terminals. Such environments were implemented by both IBM's
Systems Network Architecture (SNA) and Digital's network architecture.
 Local-area networks (LANs) evolved around the PC revolution. LANs
enabled multiple users in a relatively small geographical area to
exchange
files and messages, as well as access shared resources such as file
servers
and printers.
 Wide-area networks (WANs) interconnect LANs with geographically
dispersed users to create connectivity. Some of the technologies used
for
connecting LANs include T1, T3, ATM, ISDN, ADSL, Frame Relay, radio
links, and others. New methods of connecting dispersed LANs are
appearing
01/20/25 everyday. Prepared by: Mukesh Bathre Slide 20
The OSI Reference Model
The International Standards Organisation (ISO) developed Open
Systems Interconnection (OS1) reference model for networking the
model gives guidelines about how the parts of a network
communication system should work together.
The Open System Interconnection (OS1) reference model describes
how information from a software application in one computer
moves through a network medium to a software application in
another computer. The OSI reference model is a conceptual moclel
composed of seven layers, each specifying particular network
functions. The model was developed by the lnternational Standards
Organisation (1SO) in 1984, and it is now considered the primary
architectural model for inter computer communications.

01/20/25 Prepared by: Mukesh Bathre Slide 21


The ISO-OSI Reference Model

01/20/25 Prepared by: Mukesh Bathre Slide 22


The OSI Reference Model

01/20/25 Prepared by: Mukesh Bathre Slide 23


The OSI Reference Model

01/20/25 Prepared by: Mukesh Bathre Slide 24


Packet Switching
 Packet switching involves the breaking up of messages into smaller
components called packets. Packets often range in size from about 128
bytes to over 4096 bytes depending on the system involved. Each packet
contains source and destination information, and is treated as an individual
message. These mini-messages are received and routed through optimal
routes by various nodes on a wide area network. Far example a file to be
transmitted between two machines may be broken into many packets that
are sent across the network one at a time. The network H/W delivers the
packet to the end where the network software reassembles them into a
single file again.

 There are two major types of packets to be switched. They are


datagram
and virtual circuit.

 In the datagram approach, each packet is treated independently


and may follow a different path through the network. Packets may be re-
ordered, dropped or delivered in wrong sequence. The communication
01/20/25 Prepared by: Mukesh Bathre Slide 25
Packet Switching
In the virtual circuit approach, a fixed logical path through the
network from sender to destination is established before any packets are
sent. This path remains unchanged for the duration of the connection or
session. Although no resources are reserved along the path, packets are
buffered at intermediate nodes awaiting transmission.

breaking up
Message into
packets

Packets follows different


Path in between source
& destination

Reassembling of
Packets into file

01/20/25 Prepared by: Mukesh Bathre Slide 26


Internetworking Concept
"How are networks interconnected to form an internetwork?"
The answer has two parts.
 Physically, two networks can only be connected by a computer that
attaches to both of them. A physical attachment does not provide the
interconnection we have in mind, however, because such a connection
does not guarantee that the computer will cooperate with other machines
that wish to communicate.
 To have a viable internet, we need computers that are willing to shuffle
packets from one network to another. Computers that interconnect two
networks and pass packets from one to the other are called internet
gateways+ or internet routers.

01/20/25 Prepared by: Mukesh Bathre Slide 27


Internetworking Concept
Consider an example consisting of two physical networks shown in
Figure 3. In the figure, machine G connects to both network 1 and
network 2. For G to act as a gateway, it must capture packets on
network 1 that are bound for machines on network 2, and packets
on network 2 that are destined for machines on network 1 and
transfer them.

01/20/25 Prepared by: Mukesh Bathre Slide 28


Internetworking Concept
Interconnection through IP Gateways or Routers
When internet connections become more complex, gateways need
to know about the topology of the internet beyond the networks to
which they connect. For example, Figure 4 shows three networks
interconnected by two gateways.

 In a TCP/IP internet, computers called gateways provide all


interconnections among physical networks.
 Gateways route packets based on destination network, not on
destination host.
01/20/25 Prepared by: Mukesh Bathre Slide 29
Internetworking Concept: Hub, Switch & Router

01/20/25 Prepared by: Mukesh Bathre Slide 30


Internetworking Concept: Switch
Switches are fundamental part of many networks because they speed
things up. Switches allow different nodes (a network connection point,
typically a computer) of a network to communicate directly with one
another in a smooth and efficient manner.

A switch is a layer 2 network device that forwards frames using MAC


addresses in the header of frames. It is used to improve network
performance by:-
 Segmenting the network and creating separate collision domains.
 Reducing competition for bandwidth.

01/20/25 Prepared by: Mukesh Bathre Slide 31


Internetworking Concept: Router
The Router
A Router is a layer 3 network device that moves data between different
network segments and can look into a packet header to determine the best
path for the packet to travel. Routers can connect network segments that
use different protocols. They also allow all users in a network to share a
single connection to the Internet or a WAN. It is used to improve network
performance by:-
 Segmenting the network and creating separate collision & broadcast
domains.
 Reducing competition for bandwidth.
 Broadcasts are not forwarded to other network segments.
 Increases security by using Access Lists.

01/20/25 Prepared by: Mukesh Bathre Slide 32


Internetworking Concept: Router

01/20/25 Prepared by: Mukesh Bathre Slide 33


Internetworking Concept: TCP/IP Model
The TCP/IP Model combines one or more layer functions. It has only four
layers instead of using seven layers of OSI model. Generally TCP/IP model
is used in modern computers. Figure shows the TCP/IP model in next slide.
The four layers of TCP/IP model are:
• Application Layer: This layer combines the functions of OSI Application,
Presentation and Session Layers. This layer makes use of protocols for
simple applications such as e-mail, file transfer etc.
• Transport Layer: In the TCP/IP model, the layer above the internet layer
is known as transport layer. It is developed to permit entities on the source
and destination hosts to carry on a conversation. It specifies 2 end-to-end
protocols
1)TCP (Transmission Control Protocol)
2)UDP (User Datagram Protocol)

01/20/25 Prepared by: Mukesh Bathre Slide 34


Internetworking Concept: TCP/IP Model

1) TCP: It is a reliable connection-oriented protocol that permits a byte


stream originating on one machine to be transported without error on
any machine in the internet. It divides the incoming byte stream into
discrete message and passes each one onto the internet layer. At the
destination, the receiving TCP process collects the received message
into the output stream. TCP deals with flow control to make sure a fast
sender cannot swamp a slow receiver with more message than it can
handle.

2) UDP: It is an unreliable, connectionless protocol for applications that do


not want TCP's sequencing on flow control and wish to offer their own. It
is also used for client-server type request-reply queries and applications
in which prompt delivery is more important than accurate delivery such
as transmitting speech or video.
01/20/25 Prepared by: Mukesh Bathre Slide 35
Internetworking Concept: TCP/IP Model
• Internet layer : The internet layer specifies an official packet format
and
protocol known as internet protocol. The job of internet layer is to
transport IP packets to appropriate destination. Packet routing is very
essential task in order to avoid congestion. For these reason it is said
that TCP/IP internet layer perform same function as that of OSI network
layer.

• Network Layer: This layer combines the physical and data link layer.
The task of this layer is to route the data between the devices present
in the same network. This layer perform the mapping of the IP
Addresses and network physical addresses. The physical layer ensures
the safe and efficient transmission of data. It consists of electronics
circuits for transmission of data.
Internetworking Concept: TCP/IP Model

01/20/25 Prepared by: Mukesh Bathre Slide 37


Internetworking Concept: IP Addressing
• Each host on a TCP/IP network is assigned a unique 32-bit logical
address that is divided into two parts: the network number and the host
number. This address is called an IP address.
• The IP address is grouped four into 8-bits separated by dots. Each nit in
the octet has a binary weight.

• The IP address is divided into two categories network number and host
number.

Network Number Host Number

01/20/25 Prepared by: Mukesh Bathre Slide 38


Internetworking Concept: IP Addressing
There are 5 classes based on two categories viz. A, B, C, D and E.

IP Address Class Format Range Purpose

Class A N.H.H.H 1 to 126 Very large organization uses this class addressing.

Class B N.N.H.H 128 to 191 Medium size organization uses this addressing.

Class C N.N.N.H 192 to 223 Relatively small organization uses this addressing.

Class D - 224 to 239 This class is used for multicast groups.

This class addressing is reserved for experimental


Class E - 240 to 254
purpose

01/20/25 Prepared by: Mukesh Bathre Slide 39


Internetworking Concept: IP Addressing

01/20/25 Prepared by: Mukesh Bathre Slide 40


Domain Name System
DNS Stands for "Domain Name System." The primary purpose of DNS is to
keep Web surfers sane. Without DNS, we would have to remember the IP
address of every site we wanted to visit, instead of just the domain name.
Can you imagine having to remember "17.254.3.183" instead of just
"apple.com"?

The reason the Domain Name System is used is because Web sites are
actually located by their IP addresses. For example, when you type in
"http://www.adobe.com," the computer doesn't immediately know that it
should look for Adobe's Web site. Instead, it sends a request to the nearest
DNS server, which finds the correct IP address for "adobe.com." Your
computer then attempts to connect to the server with that IP number. DNS
is just another one of the many features of the Internet that we take for
granted.

01/20/25 Prepared by: Mukesh Bathre Slide 41


WWW (World Wide Web)
 The world wide web is a system of Internet servers that supports
hypertext
and multimedia to access several Internet protocols on a single interface.
The World Wide Web is often abbreviated as the web or www.

 The World Wide Web was developed in 1989 by Tim Berners-Lee of the
European Particle Physics Lab (CERN) in Switzerland.

 The initial purpose of the Web was to use networked hypertext to


facilitate communication among its members, who were located in several
countries.

 In addition to hypertext, the Web began to incorporate graphics, video,


and sound. The use of the Web has reached global proportions and has
become
01/20/25 a defining element of human
Prepared culture
by: Mukesh in an amazingly shortSlide
Bathre period
42
WWW Services (Protocols)
 The surface simplicity of the Web comes from the fact that many
individual protocols can be contained within a single Web site. internet
protocols are sets of rules that allow for intermachine communication
on the Internet. These are a few of the protocols you can experience on
the Web:
1. HTTP (HyperText Transfer Protocol): transmits hypertext over
networks. This is the protocol of the Web.

1. E-mail (Simple Mail Transport Protocol or SMTP): distributes e-mail


messages and attached files to one or more electronic mailboxes.

01/20/25 Prepared by: Mukesh Bathre Slide 43


WWW Services (Protocols)
3. FTP (File Transfer Protocol): transfers files between an FTP server and a
computer, for example, to download software.

4. VoIP (Voice over Internet Protocol): allows delivery of voice


communications over IP networks, for example, phone calls.

01/20/25 Prepared by: Mukesh Bathre Slide 44


Web Browser
 Web Browser is a kind of software which is basically used to use the
resources on the Web.
 Over the network, two computer communicates with each other. In this
Communication, when request is made by one computer then that computer
Is called Client and then request is served by another computer then that
Computer is called server. Thus exchange of information takes place via
Client-server communication.
 Web browsers are the program that run on the client machine.
 Web browser can browse the information on the server and hence it is
called Web Browser.
 Various Web Browser that are commonly used are:
 Internet Explorer
 Mozilla Firefox
 Netscape Navigator
01/20/25 Prepared by: Mukesh Bathre Slide 45
Web Server
 Web Server is a special type of server to Which the web browser submits
the request of web page which is desired by the client.
 A web server is a piece of software that enables a website to be viewed
using HTTP. HTTP (HyperText Transfer Protocol) is the key protocol for the
transfer of data on the web.
 There are some popularly used Web Servers such as Apache and IIS from
Microsoft.
 Apache:
 It is an excellent web server because of its two important features:
Reliability and Efficiency.
 Secondly it is more popular because it is an open source software.
 Apache web server is best suitable for UNIX system but it can also be
used on Windows box.
 IIS (Internet Information Server):
01/20/25 Prepared by: Mukesh Bathre Slide 46
Working of Web Browser and Web Server
Whenever you view a web page on the internet, you are requesting that
page from a web server. When you type a URL into your browser (for
example, "http://www.google.com"), your browser requests the page from
the web server and the web server sends the page back:

01/20/25 Prepared by: Mukesh Bathre Slide 47


Working of Web Browser and Web Server
 Your web browser first needs to know which IP address the website
"www.google.com" resolves to. If it doesn't already have this information
stored in it's cache, it requests the information from one or more DNS
servers (via the internet). The DNS server tells the browser which IP address
the website is located at. Note that the IP address was assigned when the
website was first created on the web server.
 Now that the web browser knows which IP address the website is located
at, it can request the full URL from the web server.
 The web server responds by sending back the requested page. If the
page doesn't exist (or another error occurs), it will send back the
appropriate error message.
 Your web browser receives the page and renders it as required.

01/20/25 Prepared by: Mukesh Bathre Slide 48


Services of Web Server
 Primary task of web server is to monitor communications port on the host
machine. It accepts the HTTP command using the port and performs the
operation specified by the commands.
 Web Server supports more than one site on computer potentially
reducing the cost of each site and making their maintenance more
convenient.
 Web Server were originally designed to support HTTP protocol, there are
web servers which support FTP, Gopher, News and Mail.
 There is a concept of Proxy Server intended to provide more services of
Web Server. The proxy Server is a server which serves the request made by
the clients by forwarding those requests to the corresponding servers.
The proxy server sometimes can alter the client’s request. The proxy server
are most commonly used to control, monitor or unbound the network traffic.
Using the proxy server setting, some organizations can block certain sites
so that controlling of network
01/20/25 traffic
Prepared by: can be Bathre
Mukesh possible. Slide 49
2-tier Architecture
 The n-tier architecture can be 2-tier, 3-tier or multi-tier architecture.
2-tier Architecture

01/20/25 Prepared by: Mukesh Bathre Slide 50


3-tier Architecture
3-tier Architecture
In this architecture, there are 3 components.
1.Client PC
2.An application server
3.A database server
In this architecture the work of server is distributed among application
server
and database servers. Application server posses the required
communication
functions. The data required by this business logic is present on the
database
Server. The required data is returned to application servers and then to
client
PC.
01/20/25 Prepared by: Mukesh Bathre Slide 51
3-tier Architecture
3-tier Architecture

01/20/25 Prepared by: Mukesh Bathre Slide 52


n-tier Architecture
n-tier (Multi-tier) Architecture
Multi-tier architecture helps in handling web request very effectively.
Various components of this architecture are:
1.Client PC
2.HTTP Server
3.Application Server
4.Web Services, EJB Container, JDBC, Java JDL, and so on.
5.Distributed Components (CORBA)
6.Database
7.Connectors

01/20/25 Prepared by: Mukesh Bathre Slide 53


n-tier Architecture

N-tier Architecture

01/20/25 Prepared by: Mukesh Bathre Slide 54


n-tier Architecture
Advantages of n-tier architecture
1.It divides application processing across multiple machines.
2.Optimizes client PCs for input and presentation of data.
3.Optimizes server for data processing and storage.
4.Scaling is possible by adding more powerful servers and clients.
5.Data replication can be avoided as data is stored on database servers.

Disadvantages of n-tier architecture


1.It makes overall structure more complex.
2.It is difficult to setup n-tier architecture.

01/20/25 Prepared by: Mukesh Bathre Slide 55


CGI (Common Gateway Interface)
• CGI (Common Gateway Interface) is a protocol that can be used to
communicate between Web Forms and your program. CGI is the part of the
Web server that can communicate with other programs running on the
server.
• A CGI script can be written in any language that can read STDIN, write to
STDOUT, and read environment variables. These languages can be C, C++,
Perl or shell scripting etc.
• CGI Script can run on any platform but generally it is run on Unix
platform. Other commonly used platforms are Windows XP, MAC OS.
• CGI is a Server-side scripting language. It has the following advantages
over Client-side scripting language like Jscript:
o Cross-platform Independent
o More options for applications
o Increased power
o Code
01/20/25 Integrity Prepared by: Mukesh Bathre Slide 56
CGI (Common Gateway Interface)
CGI is the part of the Web server that can communicate with other
programs running on the server. With CGI, the Web server can call up a
program, while passing user-specific data to the program (such as what
host the user is connecting from, or input the user has supplied using HTML
form syntax). The program then processes that data and the server passes
the program's response back to the Web browser.

01/20/25 Prepared by: Mukesh Bathre Slide 57


CGI (Common Gateway Interface)
How to write CGI Script:
1. Before writing CGI script it is necessary to install web server (such as
Apache, IIS) on which the script can be downloaded.
2. The CGI script can be written in C or in PERL. It should be executed in
cgi-bin directory of your web browser.
3. The extension to these CGI script file is .cgi or .pm

Here is an example of CGI program:

01/20/25 Prepared by: Mukesh Bathre Slide 58


CGI (Common Gateway Interface)
CGI is a standard protocol for interfacing the web application with the web
server. There are various alternating approach to the CGI for server-side
communication and dynamic documents and those approaches are:
• ASP.NET
• JSP Pages

01/20/25 Prepared by: Mukesh Bathre Slide 59


URL (Uniform Resource Locator)
 URL Stands for "Uniform Resource Locator." A URL is the address of a
specific Web site or file on the Internet. It cannot have spaces or certain
other characters and uses forward slashes to denote different directories.
 Some examples of URLs are http://www.cnet.com/,
http://web.mit.edu/, and ftp://info.apple.com/. As you can see, not all
URLs begin with "http". The first part of a URL indicates what kind of
resource it is addressing. Here is an example of a http URL.

01/20/25 Prepared by: Mukesh Bathre Slide 60


URL (Uniform Resource Locator): URL
Formats

01/20/25 Prepared by: Mukesh Bathre Slide 61


HTTP (Hyper Text Transfer Protocol)

HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based


communication protocol which is used to deliver virtually all files and other
data, collectively called resources, on the World Wide Web. These resources
could be HTML files, image files, query results, or anything else.
A browser is works as an HTTP client because it sends requests to an HTTP
server which is called Web server. The Web Server then sends responses
back to the client. The standard and default port for HTTP servers to listen
on is 80 but it can be changed to any other port like 8080 etc.
There are three important things about HTTP of which you should be aware:
 HTTP is connectionless: After a request is made, the client disconnects
from the server and waits for a response. The server must re-establish the
connection after it process the request.

01/20/25 Prepared by: Mukesh Bathre Slide 62


HTTP (Hyper Text Transfer Protocol)
 HTTP is media independent: Any type of data can be sent by HTTP as
long as both the client and server know how to handle the data content.
How content is handled is determined by the MIME specification.
 HTTP is stateless: This is a direct result of HTTP's being connectionless.
The server and client are aware of each other only during a request.
Afterwards, each forgets the other. For this reason neither the client nor the
browser can retain information between different request across the web
pages.

01/20/25 Prepared by: Mukesh Bathre Slide 63


HTTP (Hyper Text Transfer Protocol)
HTTP Request Message Structure:
The format of the request messages has the following structure:
 Start line.
 Zero or more header lines.
 A blank line.
 An optional message body like file, query data or query output.

01/20/25 Prepared by: Mukesh Bathre Slide 64


HTTP (Hyper Text Transfer Protocol)
HTTP Request Message Structure: Start line
 The start line consists of three parts which are separated by a space.
These parts are:
{Method} space {URI} space {HTTP Version}

The method defines the The URI (Uniform Resource The official version of
connect method which is Identifier) is a string used to HTTP is HTTP/1.1.
used during the web identify the names or
browser and Web server resource on the internet.
communication. It is always The URI is a combination of
written in Uppercase letters. URL and URN.
URL denotes a web
address and URN denotes
a specific name of person or
place or item.

01/20/25 Prepared by: Mukesh Bathre Slide 65


HTTP (Hyper Text Transfer Protocol)

01/20/25 Prepared by: Mukesh Bathre Slide 66


HTTP (Hyper Text Transfer Protocol)
HTTP Request Message Structure: Header Fields
Header lines provide information about the request or response, or about
the object sent in the message body. Header fields are in the form of field
name and field value. There are various fields in header field:

01/20/25 Prepared by: Mukesh Bathre Slide 67


HTTP (Hyper Text Transfer Protocol)
HTTP Request Message Structure: Message Body
An HTTP message may have a body of data sent after the header lines. In a
request, this is where user-entered data or uploaded files are sent to the
server.
If an HTTP message includes a body, there are usually header lines in the
message that describe the body. In particular:
The Content-Type: header gives the MIME-type of the data in the body,
such as text/html or image/gif.
The Content-Length: header gives the number of bytes in the body.

01/20/25 Prepared by: Mukesh Bathre Slide 68


HTTP (Hyper Text Transfer Protocol)

HTTP Request Message Example


01/20/25 Prepared by: Mukesh Bathre Slide 69
HTTP (Hyper Text Transfer Protocol)
HTTP Response Message Structure:
The format of the request messages has the following structure:
 Status line.
 Zero or more header lines.
 A blank line.
 An optional message body like file, query data or query output.

01/20/25 Prepared by: Mukesh Bathre Slide 70


HTTP (Hyper Text Transfer Protocol)
HTTP Response Message Structure: Status line
 The start line consists of three parts which are separated by a space.
These parts are:
{HTTP Version} space {Status Code} space {Reason Phrase}

The HTTP Version denotes The status code is a The reason phrase is
the HTTP version such as numeric code indicating the in the text string form
HTTP/1.1. type of response. and presents the
information about the
status code.

01/20/25 Prepared by: Mukesh Bathre Slide 71


Some Commonly used
Status Code
01/20/25 Prepared by: Mukesh Bathre Slide 72
HTTP (Hyper Text Transfer Protocol)
HTTP Request Message Structure: Message Body
An HTTP message may have a body of data sent after the header lines. In a
response, this is where the requested resource is returned to the client (the
most common use of the message body), or perhaps explanatory text if
there's an error.
If an HTTP message includes a body, there are usually header lines in the
message that describe the body. In particular:
The Content-Type: header gives the MIME-type of the data in the body,
such as text/html or image/gif.
The Content-Length: header gives the number of bytes in the body.

01/20/25 Prepared by: Mukesh Bathre Slide 73


HTTP Response Message Example

01/20/25 Prepared by: Mukesh Bathre Slide 74


HTTPS (Hyper Text Transfer Protocol
Secure)
HTTPS Stands for Hypertext Transfer Protocol over Secure, HTTPS is a
secure method of accessing or sending information across a web page. All
data sent over HTTPS is encrypted before it is sent, this prevents anyone
from understanding that information if intercepted. HTTPS uses SSL
(Secured Socket Layer) for security. Because data is encrypted over HTTPS,
it is slower than HTTP, which is why HTTPS is only used when requiring login
information or with pages that contain sensitive information such as an
online bank web page.
What Is HTTPS (Hypertext Transfer Protocol Secure)? HTTPS is a
communication protocol that uses the HTTP (Hypertext Transfer Protocol)
and the SSL/TLS (Secure Sockets Layer/Transport Layer Security) protocols
to provide encrypted communication and secure identification of a Web
server.

01/20/25 Prepared by: Mukesh Bathre Slide 75


HTTPS (Hyper Text Transfer Protocol
Secure)
HTTPS has two important security related elements:
1.Web server authentication - The browser ensures the identity of the
Web server by validation the server's certificate against the certificate of
the CA (Certificate Authority).
2.Communication privacy - The browser uses the public key included in
the server's certificate to encrypt a secret key to server. All data exchanged
between the server and the browser will be encrypted with the secret key.

When you visit a Web site and you see the Web address starting with
"https://...", you know that the Web site uses HTTPS. If you trust your
browser and trust the CA, you can trust the HTTPS communication and
exchange private information with the Web site without any security
concerns.

01/20/25 Prepared by: Mukesh Bathre Slide 76


HTTPS (Hyper Text Transfer Protocol
Secure)
For example, if you visit
Paypal Web site, you will
see the Web address
displayed as
"https://www.paypal.com/":

01/20/25 Prepared by: Mukesh Bathre Slide 77


HTTPS (Hyper Text Transfer Protocol
Secure)

HTTPS Server
Authentication
Process

01/20/25 Prepared by: Mukesh Bathre Slide 78

You might also like