`
shiyouxu
  • 浏览: 1744 次
  • 性别: Icon_minigender_1
  • 来自: 合肥
文章分类
社区版块
存档分类
最新评论

Head First Servlets and Jsp 第一章

阅读更多

1.HTTP stands for HyperText Transfer Protocol,and is the network protocol used on the Web.It runs on top of TCP/IP.

 

2.HTTP uses a request/response model--the client makes an HTTP request, and the web server gives back an HTTP response that the browser then figures out how to handle(depending on the content type of the response).

 

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

 

4.An HTTP request includes the request URL(the resource the client is trying to access),the HTTP method(GET,POST,etc.). and (optionally) form parameter data (also called the "query string").

 

5.An HTTP response includes a status code,the content-type (also known as MIME type),and actual content of response (HTML,image,etc.)

 

6.A GET request appends form data to the end of URL.

 

7.A POST request includes form data in the body of the request.

 

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

 

9.URL stands for Uniform Resource Locator.Every resource on the web has its own unique address in this format.It starts with a protocol,followed by 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.

 

10.Web servers are good at serving static HTML pages,but if you need dynamicallygenerated data in the pagee (the current time,for example),you need some kind of helper app that can work with the server. The non-Java term for there  helper apps (most often written in Perl) is CGI (which stands for Common Gateway Interface).

 

11.Putting HTML inside a println() statement is ugly and error-prone,but JSPs solve that problem by letting you put Java into an HTML page rather than putting HTML int Java code.

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics