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 Overview (2) The parts of the Web model.
1. Architectural Overview (3):The Client Side (a) A browser plug-in. (b) A helper application.
1. Architectural Overview (4): The Server Side A multithreaded Web server with a front end and processing modules.
2. URLs – Uniform Resource Locaters Some common URLs.
3. HTTP Methods (1) The built-in HTTP request methods.
3. HTTP Methods (2) The status code response groups.
3. HTTP Message Headers (3) Some HTTP message headers.
3. Example HTTP Usage (4) The start of the output of
4. HTML – HyperText Markup Language (1) (b) (a) The HTML for a sample Web page. (b) The formatted page.
4. HTML (2) A selection of common HTML tags. some can have additional parameters.
4. HTML(3): Overview of Forms <FORM action=‘url’ method=‘get’>… Textarea Menus Input • Button types • Text (and password) type • Hidden type
4. HTML(4): A simple form
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>
4. HTML (6): Forms The FORM tag – Method attribute – Action attribute – Enctype attribute – Name attribute? Form Elements in general – output name-value pairs
4. HTML (7): Form output
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
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?
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
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
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
5. Socket (2): Framework Application Program User Space Application Program User Space Socket Layer Kernel Space Socket Layer Kernel Space UDP TCP UDP TCP IP IP Physical Network Physical Network (driver) (driver)
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!
Recommend
More recommend