日期:2014-05-16  浏览次数:20321 次

Java Tomcat JSP HTTP Request and Response -----1
(1)HTTP stands for HypeText transfer protocol, and is the network protocol used on the web.It turns on top of the TCP/IP.

(
2)Http uses a request /response model- the client makes an http request and the webserver gives back and http response that the browser then figures out how to handle(depending on the content tupe of the response).

(3)If the response from the server is an HTML page,the HTML is added to HTTP response.

(4)An Http request includes the request URL(the resouce the client is trying to access), the HTTP method(Get, POST,etc), and(Optional) from parameter data(also called the "query string")..

(5)A GET request appends the data to the end of the URL

(
6)A POST request include the form data in the body of the request

(7)A MIME type tells the browser what kind of data the browser is about to receive so that the browser will know what to do with it(render the HTML, display the graphic, play the music,etc)

(8)URL stands for Uniform resource locator. Every resource on the web has its own unique address in this format .It starts with a protocol, follwoed  bu the server name, an optional port number, and usually a specific path and resource name , it can also include an optional query string, if the URL is for a GET request.

(9)Web servers are good at serving static HTML pages, but if you need dynamically generated data in the page (The currently time,for example), you need some kind of helper app that can work with the server. The non-java term for these helper apps(Most oftern written in perl) is CGI(which stands for comon gateway Interface)

(10)Putting HTML inside a println() statement is uglyu and error-prone but JSPs solve that problem by letting you put java into HTML rather than putting HTML into JAVA code.