高校学生公寓管理系统_外文翻译(范文)内容摘要:
er the plete page. Request Parameters Besides the URI and headers, a request message can contain additional information in the form of parameters. If the URI identifies a serverside program for displaying weather information, for example, request parameters can provide information about the city the user wants to see a forecast for. In an emerce application, the URI may identify a program that processes orders, with the user39。 s customer number and the list of items to be purchased transferred as parameters. Parameters can be sent in one of two ways: tacked on to the URI in the form of a query string or sent as part of the request message body. This is an example of a URL with a query string: The query string starts with a question mark (?) and consists of name/value pairs separated by ampersands (amp。 ). These names and values must be URLencoded, meaning that special characters, such as whitespace, question marks, ampersands, and all other nonalphanumeric characters are encoded so that they don39。 t get confused with characters used to separate name/value pairs and other parts of the URI. In this example, the space between Hermosa and Beach is encoded as a plus sign. Other special characters are encoded as their corresponding hexadecimal ASCII value。 for instance, a question mark is encoded as %3F. When parameters are sent as part of the request body, they follow the same syntax。 URL encoded name/value pairs separated by ampersands. Request Methods As described earlier, GET is the most monly used request method, intended to retrieve a resource without causing anything else to happen on the server. The POST method is almost as mon as GET。 it requests some kind of processing on the server, for instance, updating a database or processing a purchase order. The way parameters are transferred is one of the most obvious differences between the GET and POST request methods. A GET request always uses a query string to send parameter values, while a POST request always sends them as part of the body (additionally, it can send some parameters as a query string, just to make life interesting). If you insert a link in an HTML page using an a element, clicking on the link results in a GET request being sent to the server. Since the GET request uses a query string to pass parameters, you can include hardcoded parameter values in the link URI: a href=/forecast?city=Hermosa+Beachamp。 state=CA Hermosa Beach weather forecast /a When you use a form to send user input to the server, you can specify whether to use the GET or POST method with the method attribute, as shown here: form action=/forecast method=POST City: input name=city type=text State: input name=state type=text p input type=SUBMIT /form If the user enters Hermosa Beach and CA in the form fields and clicks on the Submit button, the browser sends a request message like this to the server: POST /forecast HTTP/ Host: UserAgent: Mozilla/ (Windows。 U。 Win 9x。 enUS。 rv: ) Accept: image/gif, image/jpeg, image/pjpeg, image/png, */* Acceptlanguage: enUS Acceptcharset: iso88591,*,utf8 city=Hermosa+Beachamp。 state=CA Due to the differences in how parameters are sent by GET and POST requests, as well as the differences in their intended purpose, browsers handle the requests in different ways. A GET request, parameters and all, can easily be saved as a bookmark, hardcoded as a link, and the response cached by the browser. Also, the browser knows that no damage is done if it needs to send a GET request again automatically, for instance if the user clicks the Reload button. A POST request, on the other hand, can39。 t be bookmarked as easily。 the browser would have to save both the URI and the request message body. Since a POST request is intended to perform some possibly irreversible action on the server, the browser must also ask the user if it39。 s okay to send the request again Besides the GET and POST methods, HTTP specifies the following methods: OPTIONS The OPTIONS method is used to find out what options (., methods) a server or a resource offers. HEAD The HEAD method is used to get a response with all headers generated by a GET request but without the body. It can make sure a link is valid or to see when a resource was last modified. PUT The PUT method is used to store the message body content on the server as a resource identified by the URI. DELETE The DELETE method is used to delete the resource identified by the URI. TRACE The TRACE method is used for testing the munication between the client and the server. The server sends back the request message, exactly as it received it, as the body of the response. These methods aren39。 t normally used in a web application. Servlets The JSP specification is based on the Java servlet specification. In fact, JSP pages are often bined with servlets in the same application. In this section, we take a brief look at what a servlet is, and then discuss the concepts shared by servlets and JSP pages. In Chapter 3, we39。 ll take a closer look at how JSP pages are actually turned into servlets automatically. If you39。 re already familiar with servlets, this is old news. You can safely skip the rest of this chapter. Advantages over Other ServerSide Technologies In simple terms, a servlet is a piece of code that adds new functionality to a server (typically a web server), just like CGI and proprietary server extensions such as NSAPI and ISAPI. But pared to other technologies, servlets have a number of advantages: Platform and vendor independence All the major web servers and application servers support servlets, so a servletbased solution doesn39。 t tie you to one specific vendor. Also, servlets are written in the Java programming language, so they can be used on any operating system with a Java runtime。高校学生公寓管理系统_外文翻译(范文)
相关推荐
)(OHCu 还原成红色的 Cu2O 一定是具有醛基 ( — CHO) 的有机物。 题给四个选项中只有葡萄糖分子中含 CHO,故 D 选项正 确。 答案: D 点评: 在上述实验中, NaOH 溶液一定要过量,这是因为 2)(OHCu 在过量的 NaOH存在下,跟 CH3CHO 共热能加快乙醛的氧化。 [例 8] 某有机物 A分子式为 CxHyOz, 15gA完全燃烧生成 22gCO2和
从静止开始向右运动,已知物块 B与地面 EO段间的滑动摩擦力大小为 5F ,物块 B 运动到 O 点与物块 A相碰并一起向右运动(设碰撞时间极短),运动到 D 点时撤去外力 F。 物块 B 和物块 A 可视为质点。 已知 CO=5L,OD=L。 求: ( 1)撤去外力后弹簧的最大弹性势能。 ( 2)从 D 点返回后,物块 B 从 O 点开始向左运动直到静止所用的时间是多少。 26.( 12 分)
型公益活动:历年高考题 PPT版制作。 本课件为公益作品,版权所有,不得以任何形式用于商业目的。 2020年 1月15日,汉水丑生标记。 12( 2020海南 10)酶 A、 B、 C是大肠肝菌的三种酶,每种酶只能催化下列 反应链中的一个步骤, 其中任意一种酶的缺失均能导致该酶因缺少化合物丁而不能 在基本培养基上生长。 化合物甲 化合物乙 化合物丙 化合物丁 现有三种营养缺陷型突变体
促进蛋白质的合成,并使软骨生长明显; C使呼吸、心率加快,并使体内产热量增加。 据此判断激素 A、 B、 C的化学名称依次是 ( ) A.甲状腺激素、胰岛素、生长激素 B.胰高血糖素、生长激素、甲状腺激素 C.胰岛素、生长激素、甲状腺激素 D.生长激素、胰岛素、甲状腺激素 例 1 【思路点拨】 本题主要考查动物激素的功能,解题思路为: 明确三只大白鼠注射 A 、 B 、 C