SlideShare ist ein Scribd-Unternehmen logo
1 von 42
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);   } }

Weitere ähnliche Inhalte

Was ist angesagt?

Web technology practical list
Web technology practical listWeb technology practical list
Web technology practical listdesaipratu10
 
Week 2
Week 2Week 2
Week 2Rowena LI
 
Unit 2.3 Part 1
Unit 2.3 Part 1Unit 2.3 Part 1
Unit 2.3 Part 1Intan Jameel
 
WEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLWEB PAGE DESIGN USING HTML
WEB PAGE DESIGN USING HTMLSneha Mukherjee
 
static dynamic html tags
static dynamic html tagsstatic dynamic html tags
static dynamic html tagsteach4uin
 
Introduction to html (912 kb)
Introduction to html (912 kb)Introduction to html (912 kb)
Introduction to html (912 kb)IMRAN KHAN
 
Module 1
Module 1Module 1
Module 1Xiyue Yang
 
Final by smit parekh
Final  by smit  parekhFinal  by smit  parekh
Final by smit parekhSMIT PAREKH
 
Presentation on HTML
Presentation on HTMLPresentation on HTML
Presentation on HTMLsatvirsandhu9
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmlvikasgaur31
 
HTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHimHTML Basic Tags PDF by CodeHim
HTML Basic Tags PDF by CodeHimAsifMughal24
 
HyperText Markup Language - HTML
HyperText Markup Language - HTMLHyperText Markup Language - HTML
HyperText Markup Language - HTMLSun Technlogies
 

Was ist angesagt? (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
 

Andere mochten auch (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
 

Ă„hnlich wie Ch 27

Download Workshop Lecture
Download Workshop LectureDownload Workshop Lecture
Download Workshop Lecturewebhostingguy
 
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 Websritikumar
 
Tugas Pw [6]
Tugas Pw [6]Tugas Pw [6]
Tugas Pw [6]guestca37172
 
Xhtml Part2
Xhtml Part2Xhtml Part2
Xhtml Part2nleesite
 
CIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETCIS 451: Introduction to ASP.NET
CIS 451: Introduction to ASP.NETwebhostingguy
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVCAlan 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 -- powerpointwebhostingguy
 
Web designing using html
Web designing using htmlWeb designing using html
Web designing using htmljulicris021488
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power pointjustmeanscsr
 

Ă„hnlich wie 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
 

Mehr von 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
 

KĂĽrzlich hochgeladen

Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyHire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyNitya salvi
 
08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking MenDelhi Call girls
 
🔝|97111༒99012🔝 Call Girls In {Delhi} Cr Park ₹5.5k Cash Payment With Room De...
🔝|97111༒99012🔝 Call Girls In  {Delhi} Cr Park ₹5.5k Cash Payment With Room De...🔝|97111༒99012🔝 Call Girls In  {Delhi} Cr Park ₹5.5k Cash Payment With Room De...
🔝|97111༒99012🔝 Call Girls In {Delhi} Cr Park ₹5.5k Cash Payment With Room De...Diya Sharma
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In GhazipurGenuineGirls
 
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxUEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxEuro Cup 2024 Tickets
 
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfTAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfSocial Samosa
 
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...Neil Horowitz
 
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxWorld Wide Tickets And Hospitality
 
( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptxParshotamGupta1
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceanilsa9823
 
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...World Wide Tickets And Hospitality
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Marina Costa
 
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics TradeTechnical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics TradeOptics-Trade
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Paymentanilsa9823
 
08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking MenDelhi Call girls
 
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...Eticketing.co
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...World Wide Tickets And Hospitality
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024Brian Slack
 

KĂĽrzlich hochgeladen (20)

Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls AgencyHire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
Hire đź’• 8617697112 Kasauli Call Girls Service Call Girls Agency
 
08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men08448380779 Call Girls In Lajpat Nagar Women Seeking Men
08448380779 Call Girls In Lajpat Nagar Women Seeking Men
 
🔝|97111༒99012🔝 Call Girls In {Delhi} Cr Park ₹5.5k Cash Payment With Room De...
🔝|97111༒99012🔝 Call Girls In  {Delhi} Cr Park ₹5.5k Cash Payment With Room De...🔝|97111༒99012🔝 Call Girls In  {Delhi} Cr Park ₹5.5k Cash Payment With Room De...
🔝|97111༒99012🔝 Call Girls In {Delhi} Cr Park ₹5.5k Cash Payment With Room De...
 
9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur9990611130 Find & Book Russian Call Girls In Ghazipur
9990611130 Find & Book Russian Call Girls In Ghazipur
 
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docxUEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
UEFA Euro 2024 Squad Check-in Who is Most Favorite.docx
 
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdfTAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
TAM Sports_IPL 17 Till Match 37_Celebrity Endorsement _Report.pdf
 
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...
Atlanta Dream Exec Dan Gadd on Driving Fan Engagement and Growth, Serving the...
 
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docxSlovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
Slovenia Vs Serbia UEFA Euro 2024 Fixture Guide Every Fixture Detailed.docx
 
( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx( Sports training) All topic (MCQs).pptx
( Sports training) All topic (MCQs).pptx
 
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Chinhat Lucknow best sexual service
 
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
Spain Vs Albania- Spain at risk of being thrown out of Euro 2024 with Tournam...
 
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SER...
Call Girls Service Noida Extension @9999965857 Delhi 🫦 No Advance VVIP 🍎 SER...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.Who Is Emmanuel Katto Uganda? His Career, personal life etc.
Who Is Emmanuel Katto Uganda? His Career, personal life etc.
 
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics TradeTechnical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
 
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
Top Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash PaymentTop Call Girls In Jankipuram ( Lucknow  ) 🔝 8923113531 🔝  Cash Payment
Top Call Girls In Jankipuram ( Lucknow ) 🔝 8923113531 🔝 Cash Payment
 
08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men08448380779 Call Girls In Karol Bagh Women Seeking Men
08448380779 Call Girls In Karol Bagh Women Seeking Men
 
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
Croatia vs Italy Euro Cup 2024 Three pitfalls for Spalletti’s Italy in Group ...
 
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
Spain Vs Italy 20 players confirmed for Spain's Euro 2024 squad, and three po...
 
ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024ALL NFL NETWORK CONTACTS- April 29, 2024
ALL NFL NETWORK CONTACTS- April 29, 2024
 

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); } }