【正文】
t speak HTTP or return results in HTML, so the Web browser can39。因此 ,CGI 程序必須仔細(xì)地過濾掉那些可能被外殼特殊處理的字符,如反引導(dǎo)和分號。 那么,為什么印度和菲律賓都對這項技術(shù)著呢感興趣呢?我們推測答案可能分兩部分。 Servelt 還能維護(hù)請求之間的信息,使得諸如會話跟蹤和計算結(jié)果緩存等技術(shù)變得更 為簡單。 Servlet 相對于“傳統(tǒng)” CGI 的優(yōu)點 和傳統(tǒng) CGI及許多類 CGI技術(shù)相比, Java servelt 效率更高、更易用、更強大、更容易移植、更安全、也更廉價。兩種輸入都可用來構(gòu)建輸出頁面。對應(yīng)大多數(shù)其他應(yīng)用 2 程序,也存在類似的問題。 畢業(yè)設(shè)計(論文) 文獻(xiàn)綜述和外文翻譯 設(shè)計 (論文 )題目 網(wǎng)上購物系統(tǒng)設(shè)計與實現(xiàn) 學(xué) 院: 計算機科學(xué)與工程學(xué)院 專 業(yè): 軟件工程 年 級: 2021 級 1 文獻(xiàn)綜述 摘要: Servlet 程序在服務(wù)器端運行,動態(tài)地生成 Web 頁面與傳統(tǒng)的 CGI 和許多其他類似 CGI的技術(shù)相比, Java Servlet 具有更高 的效率,更容易使用,功能更強大,具有更好的可移植性,更節(jié)省投資。因此,我們需要 Web 中間層從 HTTP 流中提取輸入數(shù)據(jù),與應(yīng)用程序會話,并將結(jié)果嵌入到文檔中?;?cookie 值針對具體用戶構(gòu)建頁面的情況尤其普遍。 效率 應(yīng)用傳統(tǒng)的 CGI,針對每個 HTTP 請求都用啟動一個新的進(jìn)程。 可移植性 Servelt 使用 Java 編程語言,并且遵循標(biāo)準(zhǔn)的 API。首先,這兩個國家都擁有大量訓(xùn)練有素的軟件開發(fā)人員。實現(xiàn)這項預(yù)防措施的難度可能超出我們的想象,在廣泛應(yīng)用的 CGI 庫中,不斷發(fā)現(xiàn)由這類問題引發(fā)的弱點。t talk directly to the database. Even if it could, for security reasons, you probably would not want it to. The same argument applies to most other need the Web middle layer to extract the results inside a document. 4. Send the explicit data (., the document) to the client. This document can be sent in a variety of formats, including text (HTML or XML), binary (GIF images), or even a pressed format like gzip that is layered on top of some other underlying format. But, HTML is by far the most mon format, so an important servlet/JSP task is to wrap the results inside of HTML. 5. Send the implicit HTTP response data. Figure 11 shows a single arrow going from the Web middle layer (the servlet or JSP page) to the client. But, there are really two varieties of data sent: the document itself and the behindthescenes HTTP information. Again, both varieties are critical to effective development. Sending HTTP response data involves telling the browser or other client what type of document is being returned (., HTML), setting cookies and caching parameters, and other such tasks. Why Build Web Pages Dynamically? many client requests can be satisfied by prebuilt documents, and the server would handle these requests without invoking servlets. In many cases, however, a static result is not sufficient, and a page needs to be generated for each request. There are a number of reasons why Web pages need to be built onthefly: 1. The Web page is based on data sent by the client. For instance, the results page from search engines and orderconfirmation pages at online stores are specific to particular user requests. You don39。s Job Servlets are Java programs that run on Web or application servers, acting as a middle layer between requests ing from Web browsers or other HTTP clients and databases or applications on the HTTP server. Their job is to perform the following tasks, as illustrated in Figure 11. Figure 11 1. Read the explicit data sent by the client. The end user normally enters this data in an HTML form on a Web page. However, the data could also e from an applet or a custom HTTP client program. 2. Read the implicit HTTP request data sent by the browser. Figure 11 shows a single arrow going from the client to the Web server (the layer where servlets and JSP execute), but there are really two varieties of data: the explicit data that the end user enters in a form and the 7 behindthescenes HTTP information. Both varieties are critical. The HTTP information includes cookies, information about media types and pression schemes the browser understands, and so on. 3. Generate the results. This process may require talking to a database, executing an RMI or EJB call, invoking a Web service, or puting the response directly. Your real data may be in a relational database. Fine. But your database probably doesn39。 安全