“The most profound technologies are those that disappear” The computer for the 21st century Mark Weiser, 1999 Father of ubiquitous computing Today’s Lecture – 05/05/12 • We will review Java • We will cover part of Chapter 1 • Remember I have office hours Today! Protocol • What is a protocol? – an agreement between states.(reference.com) – Other definitions? HTTP Protocol Request Format • Type of request • Request Header • Blank Line indicates end of request headers – In a POST request, there can be additional information sent after the blank line Response Format • Status Code • Response Header • Blank Line indicates end of respose headers Mime Type • Multipurpose Internet Mail Extensions – Use to decode type of content by browser – Use to specify formatting of non-ASCII characters – Most Common: MIME type/html Mime Type • Multipurpose Internet Mail Extensions – Use to decode type of content by browser – Use to specify formatting of non-ASCII characters – Most Common: MIME type/html Markup Language • Method of annotating text in a descriptive way for presentation and/or processing. • Taken from “marking up” a manuscript. Markup Language Examples • HTML • XML • TeX HTML Tags • Singleton – A single tag that has no corresponding closing tag • Paired – A tag with a starting a closing tag. The closing tag is denoted by a leading ‘/’ HTML Tags ( Examples ) • Singleton: – <br> – <hr> – <img> • Paired: – <p> Hello World </p> – <strong> Great Class! </strong> – <em> BYE </em> HTML Validation (HTML 5) <!DOCTTYPE HTML> <html> <head> <meta charset=“utf-8”> <title> Simple Page </title> </head> <body> <p> Hello World </p> </body> </html> Layout vs Style • Either placed in the html file or a css file. • This books will used HTML 5 – Therefore all pages used strict HTML • For example, center, font and others are not allowed. Questions! • • • • • Word Wrap and White Space Line Breaks What is the HT in HTML? Absolute vs Relative Reference? What is a URL? Forms <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>First Form</title> </head> <body> form> <p> This is a simple HTML page that has a form in it. <p> Hobby: <input type="text" name="hobby" value=""> <input type="submit" name="confirmButton" value="Confirm"> </form> < </body> </html> Query Strings • A query string is appended to a URL and carries data that is being passed to a web application • It takes the format name=value • The ‘?’ character is used to separate the URL from the query string. It does not form a part of the query string • Pairs are separated with the ‘&’ character • Example: • http://www.forReal.com/test.html?country=US A&State=FL More about forms and JSP • We will cover the rest of chapter 1 in the video lecture. • The Video lecture for Chapter 1 will be posted either Saturday or Sunday. • I will be posting a Java review as well. • Finished Chapter 1 and read Section 2.1 for next Class • We will have a quiz next week (Chapter 1) plus one Java question (from what we covered today.) Questions • Any Questions