版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、外文资料翻译 JSP 和 SQL Server 2000 相关介绍 JSP(JavaServer Pages)是由 Sun Microsystems 公司倡导、许多公司参与一起 建立的一种动态网页技术标准。 JSP 技术有点类似 ASP 技术, 它是在传统的网页 HTML 文(*.htm,*.html)中插入 Java 程序段(Scriptlet)和 JSP 标记(tag), 从而形成 JSP 文件(*.jsp)。用 JSP 开发的 Web 应用是跨平台的,即能在 Linux 下运行,也能在 其他操作系统上运行。JSP 技术使用Java 编程语言编写类XML 的 tags 和 scriptle
2、ts,来封装产生动态网页的处理逻辑。网页还能通过 tags 和 scriptlets 访问存在于服务端的资源的应用逻辑。JSP 将网页逻辑与网页设计和显示分离,支 持可重用的基于组件的设计,使基于 Web 的应用程序的开发变得迅速和容易。Web 服务器在遇到访问 JSP 网页的请求时,首先执行其中的程序段,然后将执行结果连 同 JSP 文件中的 HTML 代码一起返回给客户。插入的 Java 程序段可以操作数据库、 重新定向网页等,以实现建立动态网页所需要的功能。 JSP 与 Java Servlet 一样,是在服务器端执行的,通常返回该客户端的就是 一个 HTML 文本,因此客户端只要有浏览
3、器就能浏览。JSP 的 1.0 规范的最后版本是 1999 年 9 月推出的,12 月又推出了 1.1 规范。目前较新的是 JSP1.2 规范,JSP2.0 规范的征求意见稿也已出台。 JSP 页面由 HTML 代码和嵌入其中的 Java 代码所组成。 服务器在页面被客户端请求以后对这些 Java 代码进行处理,然后将生成的HTML 页 面返回给客户端的浏览器。Java Servlet 是 JSP 的技术基础,而且大型的 Web 应 用程序的开发需要 Java Servlet 和 JSP 配合才能完成。JSP 具备了 Java 技术的简 单易用,完全的面向对象,具有平台无关性且安全可靠,主要面
4、向因特网的所有特 点。 JSP 技术的强势 (1)一次编写,到处运行。在这一点上Java 比 PHP 更出色,除了系统之外,代码 不用做任何更改。 (2)系统的多平台支持。基本上可以在所有平台上的任意环境中开发,在任意环 境中进行系统部署,在任意环境中扩展。相比 ASP/PHP 的局限性是显而易见的。 (3)强大的可伸缩性。从只有一个小的Jar 文件就可以运行 Servlet/JSP,到由多 台服务器进行集群和负载均衡,到多台 Application 进行事务处理,消息处理,一 台服务器到无数台服务器,Java 显示了一个巨大的生命力。 (4)多样化和功能强大的开发工具支持。这一点与 ASP
5、很像,Java 已经有了许多 非常优秀的开发工具,而且许多可以免费得到,并且其中许多已经可以顺利的运行 于多种平台之下。 JSP 技术的弱势 (1) 与 ASP 一样,Java 的一些优势正是它致命的问题所在。正是由于为了跨平台 的功能,为了极度的伸缩能力,所以极大的增加了产品的复杂性。 (2) Java 的运行速度是用 class 常驻内存来完成的,所以它在一些情况下所使用 的内存比起用户数量来说确实是“最低性能价格比”了。从另一方面,它还需要硬 盘空间来储存一系列的.java 文件和.class 文件,以及对应的版本文件。 JSP 六种内置对象: request, response, ou
6、t, session, application, config, pagecontext, page, exception. 一.request 对象: 该对象封装了用户提交的信息,通过调用该对象相应的方法可以获取封装的 信息,即使用该对象可以获取用户提交信息。 二.response 对象: 对客户的请求做出动态的响应,向客户端发送数据。 三session 对象 1.什么是 session:session 对象是一个 JSP 内置对象,它在第一个 JSP 页面被 装载时自动创建,完成会话期管理。 从一个客户打开浏览器并连接到服务器开始,到客户关闭浏览器离开这个服务器 结束,被称为一个会话。当一
7、个客户访问一个服务器时,可能会在这个服务器的几 个页面之间反复连接,反复刷新一个页面,服务器应当通过某种办法知道这是同一 个客户,这就需要 session 对象。 2session 对象的 ID:当一个客户首次访问服务器上的一个JSP 页面时,JSP 引 擎产生一个 session 对象,同时分配一个 String 类型的 ID 号,JSP 引擎同时将这 个 ID 号发送到客户端,存放在 Cookie 中,这样 session 对象和客户之间就建立了 一一对应的关系。当客户再访问连接该服务器的其他页面时,不再分配给客户新的 session 对象,直到客户关闭浏览器后,服务器端该客户的 sess
8、ion 对象才取消, 并且和客户的会话对应关系消失。当客户重新打开浏览器再连接到该服务器时,服 务器为该客户再创建一个新的 session 对象。 四aplication 对象 1什么是 application: 服务器启动后就产生了这个 application 对象,当客户再所访问的网站的各个页 面之间浏览时, 这个application对象都是同一个, 直到服务器关闭。 但是与session 不同的是,所有客户的 application 对象都是同一个,即所有客户共享这个内置的 application 对象。 2application 对象常用方法: (1)public void setA
9、ttribute(String key,Object obj): 将参数 Object 指定 的对象 obj 添加到 application 对象中,并为添加的对象指定一个索引关键字。 (2)public Object getAttribute(String key): 获取 application 对象中含有 关键字的对象。 五out 对象 out 对象是一个输出流,用来向客户端输出数据。out 对象用于各种数据的输出。 六Cookie 1.什么是 Cookie: Cookie 是 Web 服务器保存在用户硬盘上的一段文本。Cookie 允许一个 Web 站点 在用户的电脑上保存信息并且随后
10、再取回它。 举例来说,一个 Web 站点可能会为每一个访问者产生一个唯一的 ID,然后以 Cookie 文件的形式保存在每个用户的机器上。 如果您使用 IE 浏览器访问 Web,您会看到所有保存在您的硬盘上的 Cookie。它 们最常存放的地方是:c:windowscookies(在 Window2000 中则是 C:Documents and Settings您的用户名Cookies ) Cookie 是以“关键字 key=值 value“的格式来保存纪录的. 2 创建一个 Cookie 对象, 调用 Cookie 对象的构造函数可以创建 Cookie。 Cookie 对象的构造函数有两个字
11、符串参数:Cookie 名字和 Cookie 值。 Cookie c=new Cookie(“username”,”john”); 3 JSP 中如果要将封装好的 Cookie 对象传送到客户端,使用 response 的 addCookie()方法。 格式:response.addCookie(c) 4读取保存到客户端的 Cookie,使用 request 对象的 getCookies()方法,执行 时将所有客户端传来的 Cookie 对象以数组的形式排列,如果要取出符合需要的 Cookie 对象,就需要循环比较数组内每个对象的关键字。 Struts 是 Apache 软件基金会 (ASF)
12、 赞助的一个开源项目。 它最初是 Jakarta 项目中的一个子项目,并在 2004 年 3 月成为 ASF 的顶级项目。它通过采用 Java Servlet/JSP 技术, 实现了基于 Java EE Web 应用的 Model-View-Controller MVC 设计模式的应用框架Web Framework,是 MVC 经典设计模式中的一个经典产品。 在 Java EE 的 Web 应用发展的初期,除了使用 Servlet 技术以外,普遍是在 JavaServer Pages (JSP)的源代码中,采用 HTML 与 Java 代码混合的方式进行开 发。因为这两种方式不可避免的要把表现
13、与业务逻辑代码混合在一起,都给前期开 发与后期维护带来巨大的复杂度。为了摆脱上述的约束与局限,把业务逻辑代码从 表现层中清晰的分离出来,2000 年,Craig McClanahan 采用了 MVC 的设计模式开 发 Struts。后来该框架产品一度被认为是最广泛、最流行 JAVA 的 WEB 应用框架。 SQL Server 关系数据库简介 1、SQL Server 是由 Microsoft 开发和推广的关系数据库系统(DBMS),它最初是由 Microsoft、Sybase 和 Ashton-Tate 三家公司共同开发的,并于 1988 年推出了第一 个 OS/2 版本。 2、关系数据库(
14、RDBMS)管理系统功能: 维护数据库数据之间的关系; 保证数据存储的正确性; 当出现系统故障的时候,将所有数据恢复到能够保证一致行的某种状态 3、RDBMS:SQL Server,Oracle,DB/2,Sybase,Informix 4、Non-RDBMS(File-based):Foxpro,Access 二、SQL Server 2000 的版本 1、SQL Server 2000 常见版本有: 企业版(Enterprise Edition) 支持所有 SQL Server 2000的功能。该版本多用于大中型产品数据库服务器,并且 可以支持大型网站,企业 OLTP(联机事务处理)和大型
15、数据仓库系统 OLAP(联机分 析处理)所要求的性能。 标准版(Standard Edition) 个人版(Personal Edition)。 开发者版(Developer Edition) 1.1 SQL Server 特点 与因特网的集成: SQL Server 2000 的数据库引擎全面支持 XML(Extensive Markup Language,扩展 标记语言),能使用户很容易地将数据库中的数据发布到 Web 页面上。 可伸缩性与可用性: 可跨越从运行 Windows 95/98 的膝上型电脑到运行 Windows 2000 的大型多处理器 等多种平台使用。另外,对联合服务器,索
16、引视图等的支持,使得SQL Server 2000 企业版可以升级到最大 Web 站点所需的性能级别。 企业级数据库功能: SQL Server 2000 分布式查询可以引用来自不同数据库的数据,而且这些对于用户 来说是完全透明的;分布式数据库将保证任何分布式数据更新时的完整性;复制可 以使我们能够维护多个数据复本,这些用户能够自主地进行工作,然后再将所做的 修改合并到发布数据库;SQL Server 2000 关系数据库引擎能够充分保护数据完整 性,还可以将管理并发修改数据库开销到最小。 易于安装,部署和使用: SQL Server 2000 由一系列的管理和开发工具组成,这些工具使得在多个
17、站点上进 行 SQL Server 的安装,部署,管理和使用变得更加容易。开发人员可以更加快速 地交付 SQL Server 应用程序,而且只需要进行最少的安装和管理就可以实现这些 应用程序。 数据仓库: 数据仓库是 SQL Server 2000中包含的用于分析取和分析汇总数据以进行联机分析 处理的工具。这个功能只在 Oracle 和其他更昂贵的 DBMS 中才有。 1.1.1 SQL Server 2000 新特性 全面扩展了 SQL Server 7.0 的性能,可靠性和易用性。增加了一系列的功能,具 体如下: 在关系数据库方面的增强 图形管理增强 增强的联合数据库服务器 1.2 SQL
18、 Server 2000 工具和实用程序 1、企业管理器 2、服务管理器 3、查询分析器 4、事件探查器 5、导入和导出数据 6、服务器网络使用工具 7、客户端网络使用工具 8、联机帮 助文档 1.2.1 企业管理器 企业管理器是基于一种新的被称为微软管理控制台(Microsoft Management Console)的公共服务器管理环境,它是SQL Server 2000 中最重要的一个管理工具。 企业管理器不仅能够配置系统环境和管理 SQL Server,而且由于它能够以层叠列表 的形式来显示所有的 SQL Server 对象,因而所有 SQL Server对象的建立与管理都 可以通过它
19、来完成。 1.2.2 服务管理器(Service Manager) SQL Server 服务管理器是在服务器端实际工作时最有用的实用程序,服务管 理器用来启动、暂停、继续和停止数据库服务器的实时服务,其提供的服务类型包 括:SQL Server、SQL Server 代理、Microsoft 搜索和分布式事务协调器等。 附件附件 2 2:外文原文:外文原文 The introduce of JSP and SQL Server 2000 of JSP and SQL Server 2000 JSP (JavaServer Pages) is initiated by Sun Microsys
20、tems, Inc., with many companies to participate in the establishment of a dynamic web page technical standards. JSP technology somewhat similar toASP technology, it is in the traditional HTML web page document (*. htm, *. html) to insert the Java programming paragraph (Scriptlet) and JSP tag (tag), t
21、hus JSP documents (*. jsp). Using JSP development of the Web application is cross-platform that can run on Linux, is also available for other operating systems. JSP technology to use the Java programming language prepared by the category of XML tags and scriptlets, to produce dynamic pages package p
22、rocessing logic. Page also visit by tags and scriptlets exist in the services side of the resources of logic. JSP page logic and web page design and display separation, support reusable component-based design, Web-based application development is rapid and easy. Web server in the face of visits JSP
23、page request, the first implementation of the procedures of, and then together with the results of the implementation of JSP documents in HTML code with the return to the customer. Insert the Java programming operation of the database can be re-oriented websites, in order to achieve the establishmen
24、t of dynamic pages needed to function. JSP and Java Servlet, is in the implementation of the server, usually returned to the client is an HTML text, as long as the client browser will be able to visit. JSP 1.0 specification of the final version is launched in September 1999, December has introduced
25、1.1 specifications. At present relatively new is JSP1.2 norms, JSP2.0 norms of the draft has also been introduced. JSP pages from HTML code and Java code embedded in one of the components. The server was in the pages of client requests after the Java code and then will generate the HTML pages to ret
26、urn tothe client browser. Java Servlet JSP is the technical foundation and large-scale Web application development needs of Java Servlet and JSP support to complete. JSP with the Java technology easy to use, fully object-oriented, and a platform-independent and secure, mainlyfor all the characterist
27、icsof the Internet. JSP technology strength (1) time to prepare, run everywhere. At this point Java better than PHP, in addition to systems, the code not to make any changes. (2) the multi-platform support. Basically on all platforms of any development environment, in any environment for deployment
28、in any environment in the expansion. Compared ASP / PHP limitations are obvious. (3) a strong scalability. From only a small Jar documents can run Servlet / JSP, to the multiple servers clustering and load balancing, to multiple Application for transaction processing, information processing, a serve
29、r to numerous servers, Java shows a tremendous Vitality. (4) diversification and powerful development tools support. This is similar to the ASP, Java already have many very good development tools, and many can be free, and many of them have been able to run on a variety of platforms under. JSP techn
30、ology vulnerable (1) and the same ASP, Java is the advantage of some of its fatal problem. It is precisely because in order to cross-platform functionality, in order to extreme stretching capacity, greatly increasing the complexity of the product. (2) Javas speed is class to complete the permanent m
31、emory, so in some cases by the use of memory compared to the number of users is indeed a minimum cost performance. On the other hand, it also needs disk space to store a series of. Java documents and. Class, as well as the corresponding versions of documents. JSP six built-in objects: request, respo
32、nse, out, session, application, config, pagecontext, page, exception. 1. Request for: The object of the package of information submitted by users, by calling the object corresponding way to access the information package, namely the use of the target users can access the information. 2. Response obj
33、ect: The customers request dynamic response to the client sent the data. 三. session object 1. What is the session: session object is a built-in objects JSP, it in the first JSP pages loaded automatically create, complete the conversation of management. From a customer to open a browser and connect t
34、o the server, to close the browser, leaving the end of this server, known as a conversation. When a customer visits a server, the server may be a few pages link between repeatedly, repeatedly refresh a page, the server should be through some kind of way to know this is the sameclient, which requires
35、 session object. 2. session object ID: When a customers first visit to a server on the JSP pages, JSP engines produce a session object, and assigned a String type of ID number, JSP engine at the same time, the ID number sent to the client, stored in Cookie, this session objects, and customers on the
36、 establishment of a one-to-one relationship. When a customer to connect to the server of the other pages, customers no longer allocated to the new session object, until, close your browser, the client-server object to cancel the session, and the conversation, and customer relationship disappeared. W
37、hen a customer re-open the browser to connect to the server, the server for the customer to create a new session object. 四. aplication target 1. What is the application: Servers have launched after the application object, when a customer to visit the site between the various pages here, this applica
38、tion objects are the same, until the server is down. But with the session differenceis that all customers of the application objects are the same, that is, all customers share this built-in application objects. 2. application objects commonly used methods: (1) public void setAttribute (String key, O
39、bject obj): Object specified parameters will be the object obj added to the application object, and to add the subject of the designation of a keyword index. (2) public Object getAttribute (String key): accessto application objects containing keywords for. 五. out targets out as a target output flow,
40、 used to client output data. out targets for the output data. 六. Cookie 1. What is Cookie: Cookie is stored in Web server on the users hard drive section of the text. Cookie allow a Web site on the users computer to store information on and then get back to it. For example, a Web site may be generat
41、ed for each visitor a unique ID, and then to Cookie in the form of documents stored in each users machine. If you use IE browser to visit Web, you will see all stored on your hard drive on the Cookie. They are most often stored in places: c: windows cookies (in Window2000 is in the C: Documents and
42、Settings your user name Cookies) Cookie is keyword key = value value to preserve the formatof the record. 2. Targets the creation of a Cookie, Cookie object called the constructor can create a Cookie. Cookie object constructor has two string parameters: Cookie Cookie name and value. Cookie c = new C
43、ookie ( username, john); 3. If the JSP in the package good Cookie object to send to the client, the use of the response addCookie () method. Format: response.addCookie (c) 4. Save to read the clients Cookie, the use of the object request getCookies () method will be implemented in all client came to
44、 an array of Cookie objects in the form of order, to meet the need to remove the Cookie object, it is necessary to compare an array cycle Each target keywords. Apache Struts is an open-source web application framework for developing Java EE web applications. It uses and extends the Java Servlet API
45、to encourage developers to adopt a model-view-controller (MVC) architecture. It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top level Apache project The WebWor
46、k framework spun off from Apache Struts several years ago, aiming to offer enhancements and refinements while retaining the same general architecture of the original Struts framework. However, it was announced in December 2005 that Struts would re-merge with WebWork. A relational database, SQL Serve
47、r 1, by Microsoft SQL Server is the development and popularization of relational database system (DBMS), which was originally by Microsoft, and Ashton Sybase Tate - three companies and joint development, launched in 1988, the first OS / 2 version. 2 and relational database management system (RDBMS)
48、function: Maintaining the relationship between database data, Ensure the correctness of the data storage, When a system fault, all data recovery to ensure consistent done some condition 3, RDBMS: SQL Server, Oracle, DB / 2, Sybase Informix, 4 and amplified RDBMS (File - based) : Foxpro, Access Secon
49、d, SQL Server 2000 version 1 and SQL Server 2000 common version: 1)Enterprise Edition 2)Standard version 3)Personal Edition 4)Developer Edition 1.1 SQL Server features With the integration of the Internet: SQL Server 2000 database engine comprehensive support XML Language, creating take (extensible
50、Markup Language), that the user can easily be database data released to the Web page. Scalability and usability: Can span from running Windows 95, 98 / the laptop to run Windows 2000 large-scale multiple processors etc. Various platforms. In addition, to jointly Server, etc, the support index view t
51、hat SQL Server 2000 enterprise edition can upgrade to the largest Web site desired performance level. Enterprise databases functions: SQL Server 2000 distributed query can quote from different database data, and these are completely transparent to users, Distributed database will ensure that any dis
52、tributed data update integrity, Copy can enable us to maintain multiple data available, the user can work independently, and then will be done by modified merged into the database, SQL Server 2000 relational database engine can fully protect data integrity, still can be modified database management concurrent cost to a minimum. Easy to install, deployment and use: SQL Server 2000 by a series of management and development tools, these tools at multiple sites on SQL Server
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年广东省英德市高三历史上册期末考试考试卷汇编附答案
- 2025年云南省景洪市高考历史测试卷(名师系列)附答案
- 第六单元检测卷 (3)-2025-2026学年三年级上册数学人教版
- 2026奥林匹克面试题及答案
- 5-6.项目五 人工智能+智能制造:机器人颜色识别-任务三图像形态学处理与轮廓框选
- 酱油制作工安全操作竞赛考核试卷含答案
- 风机操作工道德竞赛考核试卷含答案
- 电子商务物流配送协议2026年
- 电子商务平台入驻协议(2026年平台交易规则)
- 电商直播客服外包合同协议
- 《研学旅行课程设计》课件-用餐管理
- 《人类起源的演化过程》阅读测试题及答案
- 体检健康宣教课件
- 计算机网络基础IP地址课件
- 《西方哲学智慧》第十四讲:黑格尔哲学课件
- 2024年中智集团招聘笔试参考题库含答案解析
- 医院网络信息安全ppt
- DB13T 5714-2023 道路运输企业安全生产风险分级管控规范
- 建筑工程项目汇报ppt
- 2023年江苏第二师范学院招聘工作人员17人笔试备考试题及答案解析
- 最新人教部编版六年级下册语文《古诗词诵读:春夜喜雨》教学课件
评论
0/150
提交评论