http和servlet基础外文翻译(编辑修改稿)内容摘要:
ge/gif) and the body containing the bytes that make up the image. The browser then bines all responses to render 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。http和servlet基础外文翻译(编辑修改稿)
相关推荐
析 数据分析部分事实上与数据采集部分作为一个进程 (agent)存在 ,主要是为了简化程序设计的复杂性。 在得到数据帧之后, agent 模拟操作系统的 TCP/IP 堆栈对数据进行处理并与已知攻击行为的特征进行比较,从中发现异常行为,并向控制台告警。 在分析的过程中,首先对数据包进行协议分析、过滤,根据协议、端口等信息将数据包送到不同的检测流程(如只有 HTTP 协议的包才进行 CGI 检查)
101C115C97C115C115C111C99C105C97C116C101C100C119C105C116C104C98C117C105C108C100C105C110C103C115C46C84C104C101C115C105C109C117C45C108C97C116C105C111C110 C109C111C100C101C108C115 C97C114C101
新版房地产中介服务统计基层表(表格模板) 省 市 县01企业名称(盖章): 02法人(单位)代码: 年03企业详细地址:05联系电话:07电子信箱:08企业网址:09企业成立时间: 年 月10企业登记注册类型 代码:110国有企业 150有限责任公司 160股份有限公司 170私营企业200港、澳、台商投资企业 300外商投资企业11估价机构资质等级: 一级 二级
新版房屋类资产情况明细表(表格模板) 序号 所在地点建成投入使用时间 产权归属单位 使用面积 账面原值 使用类型 起始日期非转经(或闲置)面积有无协议或合同非转经年收益经营单位(个人)名称2、整体房屋中部分用于经营,而且屋产权不能分立的填“部分出租”或“部分有偿出借”“部分合作”“部分作价入股”等;3、没有经营属闲置或无偿出借的房屋填“闲置”;二、使用面积栏填
al outputs of the TIA chip are wirebonded to coupled microstrip lines on the electrical substrate, as opposed to a single 50 !2 microstrip in the case of the mm connectorized module. The coupled
、性能、参数变化很大,分离质量、生产能力不断提高,应用范围更加广泛,在离心机领域中一直占有重要地位。 在各种国际展览会上,各种各样的螺旋离心机,是所展 出的离心机中最吸引人的机型,具有良好的发展前景。 我国从七十年代末开始引进螺旋离心机,对国外著名公司生产的多种规格的卧螺离心机进行了仿制。 卧螺离心机是原化工部 “七五 ”科技攻关项目, 1989 年南京绿洲机器厂仿制了 ALFANx42o