菜单
  
    A Servlet's Job Servlets are Java programs that run on Web or application servers, acting as a middle layer between requests coming from Web browsers or other HTTP clients and databases or applications on the HTTP server. Their job is to perform the following tasks.34466
    1.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 come from an applet or a custom HTTP client program.
    1.2  Read the implicit HTTP request data sent by the browser.
    Figure 1-1 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 behind-the-scenes HTTP information. Both varieties are critical. The HTTP information includes cookies, information about media types and compression schemes the browser understands, and so on.
    1.3  Generate the results.
    This process may require talking to a database, executing an RMI or EJB call, invoking a Web service, or computing the response directly. Your real data may be in a relational database. Fine. But your database probably doesn't speak HTTP or return results in HTML, so the Web browser can'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 applications.You need the Web middle layer to extract the results inside a document.
    1.4  Send the explicit data (i.e., 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 compressed format like gzip that is layered on top of some other underlying format. But, HTML is by far the most common format, so an important servlet/JSP task is to wrap the results inside of HTML.
    1.5  Send the implicit HTTP response data.
    Figure 1-1 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 behind-the-scenes 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 (e.g., HTML), setting cookies and caching parameters, and other such tasks.
    英文出处:
    An Overview of  Servlet  and  JSP  Technology  Nagle, Wiegley
    B.原文的翻译 Servlet和JSP技术简述
    摘要:Servlet程序在服务器端运行,动态地生成Web页面与传统的CGI和许多其他类似CGI的技术相比,Java Servlet具有更高的效率,更容易使用,功能更强大,具有更好的可移植性,更节省投资。论文网
    关键字:JSP技术;Servlet;HTTP服务
      Servlet的功能
    Servlet是运行在Web或应用服务器上的Java程序,它是一个中间层,负责连接来自Web浏览器或其他HTTP客户程序的请求和HTTP服务器上的数据库或应用程序。Servlet的工作是执行西门的任务,如图1.1所示 。
    1.1 Web中间件的作用
    1.1 读取客户发送的显式数据
    最终用户一般在页面的HTML表单中输入这些数据。然而,数据还有可能来自applet或定制的HTTP客户程序。
    1.2 读取由浏览器发送的隐式请求数据
    图1.1中显示了一条从客户端到Web服务器的单箭头,但实际上从客户端传送到Web服务器的数据有两种,它们分别为用户在表单中输入的显式数据,以及后台的HTTP信息。两种数据都很重要。HTTP信息包括cookie、浏览器所能识别的媒体类型和压缩模式等。
    1.3 生成结果
    这个过程可能需要访问数据库、执行RMI或EJB调用、调用Web服务,或者直接计算得出对应的响应。实际的数据可能存储在关系型数据库中。该数据库可能不理解HTTP,或者不能返回HTML形式的结果,所有Web浏览器不能直接与数据库进行会话。即使它能够做到这一点,为了安全上的考虑,我们也不希望让它这么做。对应大多数其他应用程序,也存在类似的问题。因此,我们需要Web中间层从HTTP流中提取输入数据,与应用程序会话,并将结果嵌入到文档中。
  1. 上一篇:钢筋对裂缝宽度的影响英文文献和中文翻译
  2. 下一篇:LODGSERV在客户和酒店经营管理英文文献和中文翻译
  1. 会计师事务所任期与审计...

  2. ADO.NET结构与概述英文文献和中文翻译

  3. 信息系统开发与数据库开...

  4. 机器人学入门力学与控制英文文献和中文翻译

  5. 园林植物景观的园林绿化...

  6. 船舶与海洋结构物水动力...

  7. VisualBasic语言与算法英文文献和中文翻译

  8. 浅析中国古代宗法制度

  9. 上市公司股权结构对经营绩效的影响研究

  10. 现代简约美式风格在室内家装中的运用

  11. g-C3N4光催化剂的制备和光催化性能研究

  12. 中国传统元素在游戏角色...

  13. NFC协议物理层的软件实现+文献综述

  14. 江苏省某高中学生体质现状的调查研究

  15. 高警觉工作人群的元情绪...

  16. C++最短路径算法研究和程序设计

  17. 巴金《激流三部曲》高觉新的悲剧命运

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回