HTTP, HTML, URL, Java Socket Agenda 1. Architecture overview 2. - - PowerPoint PPT Presentation

http html url java socket agenda
SMART_READER_LITE
LIVE PREVIEW

HTTP, HTML, URL, Java Socket Agenda 1. Architecture overview 2. - - PowerPoint PPT Presentation

HTTP, HTML, URL, Java Socket Agenda 1. Architecture overview 2. URL 3. HTTP 4. HTML 5. Java Socket 1. Architectur al Overview (1) (a) A Web page (b) The page reached by clicking on Department of Animal Psychology. 1. Architectural


slide-1
SLIDE 1

HTTP, HTML, URL, Java Socket

slide-2
SLIDE 2

Agenda

  • 1. Architecture overview
  • 2. URL
  • 3. HTTP
  • 4. HTML
  • 5. Java Socket
slide-3
SLIDE 3

1. Architectur al Overview (1)

(a) A Web page (b) The page reached by clicking on Department of Animal Psychology.

slide-4
SLIDE 4
  • 1. Architectural Overview

(2)

The parts of the Web model.

slide-5
SLIDE 5
  • 1. Architectural Overview

(3):The Client Side

(a) A browser plug-in. (b) A helper application.

slide-6
SLIDE 6
  • 1. Architectural Overview

(4): The Server Side

A multithreaded Web server with a front end and processing modules.

slide-7
SLIDE 7
  • 2. URLs – Uniform

Resource Locaters

Some common URLs.

slide-8
SLIDE 8
  • 3. HTTP Methods (1)

The built-in HTTP request methods.

slide-9
SLIDE 9
  • 3. HTTP Methods (2)

The status code response groups.

slide-10
SLIDE 10
  • 3. HTTP Message Headers

(3)

Some HTTP message headers.

slide-11
SLIDE 11
  • 3. Example

HTTP Usage (4)

The start of the

  • utput of
slide-12
SLIDE 12
  • 4. HTML – HyperText

Markup Language (1)

(a) The HTML for a sample Web page. (b) The formatted page.

(b)

slide-13
SLIDE 13
  • 4. HTML (2)

A selection of common HTML tags. some can have additional parameters.

slide-14
SLIDE 14
  • 4. HTML(3): Overview of

Forms

<FORM action=‘url’ method=‘get’>… Textarea Menus Input

  • Button types
  • Text (and password) type
  • Hidden type
slide-15
SLIDE 15
  • 4. HTML(4): A simple form
slide-16
SLIDE 16
  • 4. HTML(5): A simple form

<html> <head><title>First Form</title></head> <body> </body> <h1>First Form</h1> <form name ='firstForm' method='get‘ action='http://localhost:8088/'> address: <input type='text' name='addr'><p> message: <textarea name='message' rows=5 cols=40> Enter message here </textarea><p> <input type='submit'> </form> </html>

slide-17
SLIDE 17
  • 4. HTML (6): Forms

The FORM tag

– Method attribute – Action attribute – Enctype attribute – Name attribute?

Form Elements in general

– output name-value pairs

slide-18
SLIDE 18
  • 4. HTML (7): Form output
slide-19
SLIDE 19
  • 4. HTML(8): Form

Elements

Text Area

  • Rows & cols
  • name attribute
  • no value attribute

Menu (<select>)

<select name=‘options’ size=5 multiple> <option value=‘red’ selected>

  • drop-down vs. list box use
slide-20
SLIDE 20
  • 4. HTML(9): Input types

Button types

  • Submit

– value attribute – name attribute

  • Reset
  • button

– onclick attribute: executes JS code – can do anything the other buttons can do and more – uses?

slide-21
SLIDE 21
  • 4. HTML(10): Input types

(cont)

Text type

  • Maxlength, Size
  • Value – default value

Password type Checkbox type

  • Value – return value
  • key is undefined if not checked
  • checked – default value
slide-22
SLIDE 22
  • 4. HTML(11): Input types

(cont)

Radio type

  • name attribute determines grouping
  • value – return value

Hidden type File upload

  • method must be post
  • enctype must be multipart/form-data

Server side image map

slide-23
SLIDE 23
  • 5. Socket (1)
  • Software interface designed to

communicate between the user program and TCP/IP protocol stack

  • Implemented by a set of library

function calls

  • Socket is a data structure inside the

program

  • Both client and server programs
slide-24
SLIDE 24
  • 5. Socket (2): Framework

Application Program Application Program Socket Layer Socket Layer TCP TCP UDP UDP IP IP User Space User Space Kernel Space Kernel Space Physical Network Physical Network (driver) (driver)

slide-25
SLIDE 25
  • 5. Socket (3): Socket

Families

There are several significant socket domain families: Internet Domain Sockets (AF_INET)

  • implemented via IP addresses and port

numbers Unix Domain Sockets (AF_UNIX)

  • implemented via filenames (think “named

pipe”) Novell IPX (AF_IPX) AppleTalk DDS (AF_APPLETALK)

Java Socket forms another layer of Abstraction!