SlideShare a Scribd company logo
Chapter 27 HTTP and WWW
27.1  HTTP Transaction Request Message Response Message Headers
HTTP uses the services of TCP on well-known port 80. Note :
Figure 27.1   HTTP transaction
Figure 27.2   Request message
Figure 27.3   Request line
Figure 27.4   URL
Figure 27.5   Response message
Figure 27.6   Status line
Figure 27.7   Header format
Figure 27.8   Headers
Example 1 This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in GIF and JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Fig. 27.9, next slide).
Figure 27.9   Example 1
Example 2 This example retrieves information about a document. We use the HEAD method to retrieve information about an HTML document (see the next section). The request line shows the method (HEAD), URL, and HTTP version (1.1). The header is one line showing that the client can accept the document in any format (wild card). The request does not have a body. The response message contains the status line and five lines of header. The header lines define the date, server, MIME version, type of document, and length of the document (see Fig. 27.10, next slide). Note that the response message does not contain a body.
Figure 27.10   Example 2
HTTP version 1.1 specifies a persistent connection by default.  Note :
27.2  World Wide Web Hypertext and Hypermedia Browser Architecture Static Document/HTML Dynamic Document/CGI Active Document/Java
Figure 27.11   Distributed services
Figure 27.12   Hypertext
Figure 27.13   Browser architecture
Figure 27.14   Categories of Web documents
Figure 27.15   Static document
Figure 27.16   Boldface tags
Figure 27.17   Effect of boldface tags
Figure 27.18   Beginning and ending tags
Table 27.1  Common tags  Skeletal Tags </Hn> </TITLE> </BODY> </HEAD> </HTML> Ending  Tag Defines the title of the document <Hn> Defines the title of the document <TITLE> Title and Header Tags Defines the body of the document <BODY> Defines the head of the document <HEAD> Defines an HTML document <HTML> Meaning Beginning Tag
Table 27.1  Common tags (continued)  Superscript </SUP> <SUP> Subscript </SUB> <SUB> Text Formatting Tags </BR> </CENTER> </U> </I> </B> Ending  Tag Line break <BR> Centered <CENTER> Data Flow Tag Underlined <U> Italic <I> Boldface <B> Meaning Beginning Tag
Table 27.1  Common tags (continued)  Executable Contents The document is an applet </APPLET> <APPLET> Hyperlink Tag Defines an address (hyperlink) </A> <A> List Tags </LI> </UL> </OL> Ending  Tag Defines an image <IMG> Image Tag An item in a list <LI> Unordered list <UL> Ordered list <OL> Meaning Beginning Tag
Example 3 This example shows how tags are used to let the browser format the appearance of the text. <HTML> <HEAD> <TITLE>  First Sample Document  </TITLE> </HEAD> <BODY> <CENTER>   <H1><B>   ATTENTION  </B></H1> </CENTER>   You can get a copy of this document by: <UL> <LI>  Writing to the publisher <LI>  Ordering online <LI>  Ordering through a bookstore </UL> </BODY> </HTML>
Example 4 This example shows how tags are used to import an image and insert it into the text. <HTML> <HEAD> <TITLE>  Second Sample Document  </TITLE> </HEAD> <BODY> This is the picture of a book: <IMG SRC=&quot;Pictures/book1.gif&quot;  ALIGN=MIDDLE> </BODY> </HTML>
Example 5 This example shows how tags are used to make a hyperlink to another document. <HTML> <HEAD> <TITLE>  Third Sample Document  </TITLE> </HEAD> <BODY> This is a wonderful product that can save you money and time. To get information about the producer, click on  <A HREF=&quot;http://www.phony.producer&quot;> Producer </A> </BODY> </HTML>
Figure 27.19   Dynamic document
Example 6 Example 6 is a CGI program written in Bourne shell script. The program accesses the UNIX utility (date) that returns the date and the time. Note that the program output is in plain text. #!/bin/sh  # The head of the program echo Content_type: text/plain echo # The body of the program now='date' echo  $now exit 0
Example 7 Example 7 is similar to Example 6 except that program output is in HTML. #!/bin/sh  #  The head of the program echo Content_type: text/html echo #  The body of the program echo <HTML> echo <HEAD><TITLE> Date and Time </TITLE></HEAD> echo <BODY> now='date' echo <CENTER><B> $now </B></CENTER> echo </BODY> echo </HTML> exit 0
Example 8 Example 8 is similar to Example 7 except that the program is written in Perl. #!/bin/perl  #  The head of the program print  &quot;Content_type: text/html&quot;; print &quot;&quot;; #  The body of the program print &quot;<HTML>&quot;; print &quot;<HEAD><TITLE> Date and Time </TITLE></HEAD>&quot;; print &quot;<BODY>&quot;; $now = 'date'; print &quot;<CENTER><B>  $now </B></CENTER>&quot;; print &quot;</BODY>&quot;; print &quot;</HTML>&quot;; exit 0
Figure 27.20   Active document
Figure 27.21   Skeleton of an applet
Figure 27.22   Instantiation of the object defined by an applet
Figure 27.23   Creation and compilation
Figure 27.24   HTML document carrying an applet
Example 9 In this example, we first import two packages, java.awt and java.applet. They contain the declarations and definitions of classes and methods that we need. Our example uses only one publicly  inherited  class called First. We define only one public method, paint. The browser can access the instance of First through the public method paint. The paint method, however, calls another method called drawString, which is defined in java.awt.*.  import java.applet.*; import java.awt.*; public class First extends Applet {   public void paint (Graphics  g)   {   g.drawString (&quot;Hello World&quot;, 100, 100);   } }
Example 10 In this example, we modify the program in Example 9 to draw a line. Instead of method drawString, we use another method called drawLine. This method needs four parameters: the x and y coordinates at the beginning of the line and the x and y coordinates at the end of the line. We use 0, 0 for the beginning and 80, 90 for the end. import java.applet.*; import java.awt.*; public class Second extends Applet {   public void paint (Graphics  g)   {   g.drawLine (0, 0, 80, 90);   } }

More Related Content

What's hot

Tm 1st quarter - 1st meeting
Tm   1st quarter - 1st meetingTm   1st quarter - 1st meeting
Tm 1st quarter - 1st meeting
Esmeraldo Jr Guimbarda
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
desaipratu10
 
Week 2
Week 2Week 2
Week 2
Rowena LI
 
Unit 2.3 Part 1
Unit 2.3 Part 1Unit 2.3 Part 1
Unit 2.3 Part 1
Intan Jameel
 
WEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLWEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTML
Sneha Mukherjee
 
CSS
CSSCSS
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tags
teach4uin
 
Intro Html
Intro HtmlIntro Html
Intro Html
Chidanand Byahatti
 
Htmltag.ppt
Htmltag.pptHtmltag.ppt
Htmltag.ppt
anandha ganesh
 
Html
HtmlHtml
Introduction to html (912 kb)
Introduction to html (912 kb)Introduction to html (912 kb)
Introduction to html (912 kb)
IMRAN KHAN
 
Html
HtmlHtml
Module 1
Module 1Module 1
Module 1
Xiyue Yang
 
Final by smit parekh
Final  by smit  parekhFinal  by smit  parekh
Final by smit parekh
SMIT PAREKH
 
List of html tags
List of html tagsList of html tags
List of html tags
Stellamaris Chinwendu
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
satvirsandhu9
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
vikasgaur31
 
Html
HtmlHtml
HTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHimHTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHim
AsifMughal24
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
Sun Technlogies
 

What's hot (20)

Tm 1st quarter - 1st meeting
Tm   1st quarter - 1st meetingTm   1st quarter - 1st meeting
Tm 1st quarter - 1st meeting
 
Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical list
 
Week 2
Week 2Week 2
Week 2
 
Unit 2.3 Part 1
Unit 2.3 Part 1Unit 2.3 Part 1
Unit 2.3 Part 1
 
WEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLWEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTML
 
CSS
CSSCSS
CSS
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tags
 
Intro Html
Intro HtmlIntro Html
Intro Html
 
Htmltag.ppt
Htmltag.pptHtmltag.ppt
Htmltag.ppt
 
Html
HtmlHtml
Html
 
Introduction to html (912 kb)
Introduction to html (912 kb)Introduction to html (912 kb)
Introduction to html (912 kb)
 
Html
HtmlHtml
Html
 
Module 1
Module 1Module 1
Module 1
 
Final by smit parekh
Final  by smit  parekhFinal  by smit  parekh
Final by smit parekh
 
List of html tags
List of html tagsList of html tags
List of html tags
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTML
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Html
HtmlHtml
Html
 
HTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHimHTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHim
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTML
 

Viewers also liked

Ch 20
Ch 20Ch 20
Ch 31
Ch 31Ch 31
Ch 29
Ch 29Ch 29
Ch 28
Ch 28Ch 28
Ch 24
Ch 24Ch 24
Ch 07
Ch 07Ch 07
Ch 16
Ch 16Ch 16
Ch 12
Ch 12Ch 12
Ch 23
Ch 23Ch 23
Ch 18
Ch 18Ch 18
Ch14
Ch14Ch14
Ch 26
Ch 26Ch 26
Ch 30
Ch 30Ch 30
Ch 14
Ch 14Ch 14
Ch 25
Ch 25Ch 25
Ch 02
Ch 02Ch 02
Ch 13
Ch 13Ch 13
Ch 19
Ch 19Ch 19
Ch 15
Ch 15Ch 15
Ch 10
Ch 10Ch 10

Viewers also liked (20)

Ch 20
Ch 20Ch 20
Ch 20
 
Ch 31
Ch 31Ch 31
Ch 31
 
Ch 29
Ch 29Ch 29
Ch 29
 
Ch 28
Ch 28Ch 28
Ch 28
 
Ch 24
Ch 24Ch 24
Ch 24
 
Ch 07
Ch 07Ch 07
Ch 07
 
Ch 16
Ch 16Ch 16
Ch 16
 
Ch 12
Ch 12Ch 12
Ch 12
 
Ch 23
Ch 23Ch 23
Ch 23
 
Ch 18
Ch 18Ch 18
Ch 18
 
Ch14
Ch14Ch14
Ch14
 
Ch 26
Ch 26Ch 26
Ch 26
 
Ch 30
Ch 30Ch 30
Ch 30
 
Ch 14
Ch 14Ch 14
Ch 14
 
Ch 25
Ch 25Ch 25
Ch 25
 
Ch 02
Ch 02Ch 02
Ch 02
 
Ch 13
Ch 13Ch 13
Ch 13
 
Ch 19
Ch 19Ch 19
Ch 19
 
Ch 15
Ch 15Ch 15
Ch 15
 
Ch 10
Ch 10Ch 10
Ch 10
 

Similar to Ch 27

Before start
Before startBefore start
Before start
Medhat Dawoud
 
Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecture
webhostingguy
 
How To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My WebHow To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My Web
sritikumar
 
HTML
HTMLHTML
Intro to html
Intro to htmlIntro to html
Intro to html
anshuman rahi
 
Intro to html
Intro to htmlIntro to html
Intro to html
anshuman rahi
 
Tugas Pw [6]
Tugas Pw [6]Tugas Pw [6]
Tugas Pw [6]
guestca37172
 
Tugas Pw [6] (2)
Tugas Pw [6] (2)Tugas Pw [6] (2)
Tugas Pw [6] (2)
Hafiizh Fardhani
 
Xhtml Part2
Xhtml Part2Xhtml Part2
Xhtml Part2
nleesite
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
webhostingguy
 
HTML5
HTML5HTML5
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
Alan Dean
 
HTML (Hyper Text Markup Language) Project
HTML (Hyper Text Markup Language) Project HTML (Hyper Text Markup Language) Project
HTML (Hyper Text Markup Language) Project
Ankit Gupta
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
webhostingguy
 
Html
HtmlHtml
Web designing using html
Web designing using htmlWeb designing using html
Web designing using html
julicris021488
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
justmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
justmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
justmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
justmeanscsr
 

Similar to Ch 27 (20)

Before start
Before startBefore start
Before start
 
Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecture
 
How To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My WebHow To Create Personal Web Pages On My Web
How To Create Personal Web Pages On My Web
 
HTML
HTMLHTML
HTML
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
Intro to html
Intro to htmlIntro to html
Intro to html
 
Tugas Pw [6]
Tugas Pw [6]Tugas Pw [6]
Tugas Pw [6]
 
Tugas Pw [6] (2)
Tugas Pw [6] (2)Tugas Pw [6] (2)
Tugas Pw [6] (2)
 
Xhtml Part2
Xhtml Part2Xhtml Part2
Xhtml Part2
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NET
 
HTML5
HTML5HTML5
HTML5
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
HTML (Hyper Text Markup Language) Project
HTML (Hyper Text Markup Language) Project HTML (Hyper Text Markup Language) Project
HTML (Hyper Text Markup Language) Project
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
 
Html
HtmlHtml
Html
 
Web designing using html
Web designing using htmlWeb designing using html
Web designing using html
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 

More from soumya ranjan mohanty

Ch 22
Ch 22Ch 22
Ch 21
Ch 21Ch 21
Ch 17
Ch 17Ch 17
Ch 11
Ch 11Ch 11
Ch 09
Ch 09Ch 09
Ch 08
Ch 08Ch 08
Ch 06
Ch 06Ch 06
Ch 05
Ch 05Ch 05
Ch 04
Ch 04Ch 04
Ch 03
Ch 03Ch 03
Ch 1
Ch 1Ch 1

More from soumya ranjan mohanty (11)

Ch 22
Ch 22Ch 22
Ch 22
 
Ch 21
Ch 21Ch 21
Ch 21
 
Ch 17
Ch 17Ch 17
Ch 17
 
Ch 11
Ch 11Ch 11
Ch 11
 
Ch 09
Ch 09Ch 09
Ch 09
 
Ch 08
Ch 08Ch 08
Ch 08
 
Ch 06
Ch 06Ch 06
Ch 06
 
Ch 05
Ch 05Ch 05
Ch 05
 
Ch 04
Ch 04Ch 04
Ch 04
 
Ch 03
Ch 03Ch 03
Ch 03
 
Ch 1
Ch 1Ch 1
Ch 1
 

Recently uploaded

Paris 2024 History-making Matildas team selected for Olympic Games.pdf
Paris 2024 History-making Matildas team selected for Olympic Games.pdfParis 2024 History-making Matildas team selected for Olympic Games.pdf
Paris 2024 History-making Matildas team selected for Olympic Games.pdf
Eticketing.co
 
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
Eticketing.co
 
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
Eticketing.co
 
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdfJORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
Arturo Pacheco Alvarez
 
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdfJORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
Arturo Pacheco Alvarez
 
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
Eticketing.co
 
Tennis rules and techniques with information
Tennis rules and techniques with informationTennis rules and techniques with information
Tennis rules and techniques with information
mohsintariq167876
 
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
Eticketing.co
 
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docxTurkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
Eticketing.co
 
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
Eticketing.co
 
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
Eticketing.co
 
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
Eticketing.co
 
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docxLuciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
Euro Cup 2024 Tickets
 
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
Eticketing.co
 
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
Eticketing.co
 
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
Eticketing.co
 
Psaroudakis: Family and Football – The Psaroudakis Success Story
Psaroudakis: Family and Football – The Psaroudakis Success StoryPsaroudakis: Family and Football – The Psaroudakis Success Story
Psaroudakis: Family and Football – The Psaroudakis Success Story
Psaroudakis
 
Hesan Soufi's Legacy: Inspiring the Next Generation
Hesan Soufi's Legacy: Inspiring the Next GenerationHesan Soufi's Legacy: Inspiring the Next Generation
Hesan Soufi's Legacy: Inspiring the Next Generation
Hesan Soufi 
 
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
Eticketing.co
 
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
Eticketing.co
 

Recently uploaded (20)

Paris 2024 History-making Matildas team selected for Olympic Games.pdf
Paris 2024 History-making Matildas team selected for Olympic Games.pdfParis 2024 History-making Matildas team selected for Olympic Games.pdf
Paris 2024 History-making Matildas team selected for Olympic Games.pdf
 
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
Italy vs Albania Soul and sacrifice' are the keys to success for Albania at E...
 
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
Spain vs Croatia Euro 2024 Spain's Chance to Shine on the International Stage...
 
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdfJORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 10 LIGA MURO 2024BASQUETBOL1.pdf
 
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdfJORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
JORNADA 11 LIGA MURO 2024BASQUETBOL1.pdf
 
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
Netherlands vs Austria Netherlands Face Familiar Foes in Euro Cup Germany Gro...
 
Tennis rules and techniques with information
Tennis rules and techniques with informationTennis rules and techniques with information
Tennis rules and techniques with information
 
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
Switzerland vs Germany At UEFA Euro 2024 the Full squad, preview, match sched...
 
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docxTurkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
Turkey UEFA Euro 2024 Journey A Quest for Redemption and Success.docx
 
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
Olympic 2024 Key Players and Teams to Watch in Men's and Women's Football at ...
 
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
Belgium vs Slovakia Belgium Euro 2024 Golden Generation Faces Euro Cup Final ...
 
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
Belgium vs Romania Injuries and Patience in Belgium’s Euro Cup Germany Squad....
 
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docxLuciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
Luciano Spalletti Leads Italy's Transition at UEFA Euro 2024.docx
 
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
Turkey vs Georgia Tickets: Turkey's Provisional Squad for UEFA Euro 2024, Key...
 
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
Croatia vs Italy Modric's Last Dance Croatia's UEFA Euro 2024 Journey and Ita...
 
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
Euro Cup Group E Preview, Team Strategies, Key Players, and Tactical Insights...
 
Psaroudakis: Family and Football – The Psaroudakis Success Story
Psaroudakis: Family and Football – The Psaroudakis Success StoryPsaroudakis: Family and Football – The Psaroudakis Success Story
Psaroudakis: Family and Football – The Psaroudakis Success Story
 
Hesan Soufi's Legacy: Inspiring the Next Generation
Hesan Soufi's Legacy: Inspiring the Next GenerationHesan Soufi's Legacy: Inspiring the Next Generation
Hesan Soufi's Legacy: Inspiring the Next Generation
 
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
Georgia vs Portugal Georgia UEFA Euro 2024 Squad Khvicha Kvaratskhelia Leads ...
 
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
Belgium vs Romania Ultimate Guide to Euro Cup 2024 Tactics, Ticketing, and Qu...
 

Ch 27

  • 1. Chapter 27 HTTP and WWW
  • 2. 27.1 HTTP Transaction Request Message Response Message Headers
  • 3. HTTP uses the services of TCP on well-known port 80. Note :
  • 4. Figure 27.1 HTTP transaction
  • 5. Figure 27.2 Request message
  • 6. Figure 27.3 Request line
  • 8. Figure 27.5 Response message
  • 9. Figure 27.6 Status line
  • 10. Figure 27.7 Header format
  • 11. Figure 27.8 Headers
  • 12. Example 1 This example retrieves a document. We use the GET method to retrieve an image with the path /usr/bin/image1. The request line shows the method (GET), the URL, and the HTTP version (1.1). The header has two lines that show that the client can accept images in GIF and JPEG format. The request does not have a body. The response message contains the status line and four lines of header. The header lines define the date, server, MIME version, and length of the document. The body of the document follows the header (see Fig. 27.9, next slide).
  • 13. Figure 27.9 Example 1
  • 14. Example 2 This example retrieves information about a document. We use the HEAD method to retrieve information about an HTML document (see the next section). The request line shows the method (HEAD), URL, and HTTP version (1.1). The header is one line showing that the client can accept the document in any format (wild card). The request does not have a body. The response message contains the status line and five lines of header. The header lines define the date, server, MIME version, type of document, and length of the document (see Fig. 27.10, next slide). Note that the response message does not contain a body.
  • 15. Figure 27.10 Example 2
  • 16. HTTP version 1.1 specifies a persistent connection by default. Note :
  • 17. 27.2 World Wide Web Hypertext and Hypermedia Browser Architecture Static Document/HTML Dynamic Document/CGI Active Document/Java
  • 18. Figure 27.11 Distributed services
  • 19. Figure 27.12 Hypertext
  • 20. Figure 27.13 Browser architecture
  • 21. Figure 27.14 Categories of Web documents
  • 22. Figure 27.15 Static document
  • 23. Figure 27.16 Boldface tags
  • 24. Figure 27.17 Effect of boldface tags
  • 25. Figure 27.18 Beginning and ending tags
  • 26. Table 27.1 Common tags Skeletal Tags </Hn> </TITLE> </BODY> </HEAD> </HTML> Ending Tag Defines the title of the document <Hn> Defines the title of the document <TITLE> Title and Header Tags Defines the body of the document <BODY> Defines the head of the document <HEAD> Defines an HTML document <HTML> Meaning Beginning Tag
  • 27. Table 27.1 Common tags (continued) Superscript </SUP> <SUP> Subscript </SUB> <SUB> Text Formatting Tags </BR> </CENTER> </U> </I> </B> Ending Tag Line break <BR> Centered <CENTER> Data Flow Tag Underlined <U> Italic <I> Boldface <B> Meaning Beginning Tag
  • 28. Table 27.1 Common tags (continued) Executable Contents The document is an applet </APPLET> <APPLET> Hyperlink Tag Defines an address (hyperlink) </A> <A> List Tags </LI> </UL> </OL> Ending Tag Defines an image <IMG> Image Tag An item in a list <LI> Unordered list <UL> Ordered list <OL> Meaning Beginning Tag
  • 29. Example 3 This example shows how tags are used to let the browser format the appearance of the text. <HTML> <HEAD> <TITLE> First Sample Document </TITLE> </HEAD> <BODY> <CENTER> <H1><B> ATTENTION </B></H1> </CENTER> You can get a copy of this document by: <UL> <LI> Writing to the publisher <LI> Ordering online <LI> Ordering through a bookstore </UL> </BODY> </HTML>
  • 30. Example 4 This example shows how tags are used to import an image and insert it into the text. <HTML> <HEAD> <TITLE> Second Sample Document </TITLE> </HEAD> <BODY> This is the picture of a book: <IMG SRC=&quot;Pictures/book1.gif&quot; ALIGN=MIDDLE> </BODY> </HTML>
  • 31. Example 5 This example shows how tags are used to make a hyperlink to another document. <HTML> <HEAD> <TITLE> Third Sample Document </TITLE> </HEAD> <BODY> This is a wonderful product that can save you money and time. To get information about the producer, click on <A HREF=&quot;http://www.phony.producer&quot;> Producer </A> </BODY> </HTML>
  • 32. Figure 27.19 Dynamic document
  • 33. Example 6 Example 6 is a CGI program written in Bourne shell script. The program accesses the UNIX utility (date) that returns the date and the time. Note that the program output is in plain text. #!/bin/sh # The head of the program echo Content_type: text/plain echo # The body of the program now='date' echo $now exit 0
  • 34. Example 7 Example 7 is similar to Example 6 except that program output is in HTML. #!/bin/sh # The head of the program echo Content_type: text/html echo # The body of the program echo <HTML> echo <HEAD><TITLE> Date and Time </TITLE></HEAD> echo <BODY> now='date' echo <CENTER><B> $now </B></CENTER> echo </BODY> echo </HTML> exit 0
  • 35. Example 8 Example 8 is similar to Example 7 except that the program is written in Perl. #!/bin/perl # The head of the program print &quot;Content_type: text/html&quot;; print &quot;&quot;; # The body of the program print &quot;<HTML>&quot;; print &quot;<HEAD><TITLE> Date and Time </TITLE></HEAD>&quot;; print &quot;<BODY>&quot;; $now = 'date'; print &quot;<CENTER><B> $now </B></CENTER>&quot;; print &quot;</BODY>&quot;; print &quot;</HTML>&quot;; exit 0
  • 36. Figure 27.20 Active document
  • 37. Figure 27.21 Skeleton of an applet
  • 38. Figure 27.22 Instantiation of the object defined by an applet
  • 39. Figure 27.23 Creation and compilation
  • 40. Figure 27.24 HTML document carrying an applet
  • 41. Example 9 In this example, we first import two packages, java.awt and java.applet. They contain the declarations and definitions of classes and methods that we need. Our example uses only one publicly inherited class called First. We define only one public method, paint. The browser can access the instance of First through the public method paint. The paint method, however, calls another method called drawString, which is defined in java.awt.*. import java.applet.*; import java.awt.*; public class First extends Applet { public void paint (Graphics g) { g.drawString (&quot;Hello World&quot;, 100, 100); } }
  • 42. Example 10 In this example, we modify the program in Example 9 to draw a line. Instead of method drawString, we use another method called drawLine. This method needs four parameters: the x and y coordinates at the beginning of the line and the x and y coordinates at the end of the line. We use 0, 0 for the beginning and 80, 90 for the end. import java.applet.*; import java.awt.*; public class Second extends Applet { public void paint (Graphics g) { g.drawLine (0, 0, 80, 90); } }