admin 管理员组

文章数量: 1086019


2024年4月24日发(作者:机器人编程比赛)

大连交通大学2008届本科生毕业设计(论文)外文翻译

外文原文

The Jsp status analysis

——From

/page/ffb4d8ea-5aba-41bf-933d-1cf6a940c0c7

principle analysis

The JSP (Java Server Pages) is advocated by the Sun Microsystems, many

companies joined to establish a dynamic web technology standard. In a traditional

techniques JSP page Hypertext Markup Language,HTML files insert Java program

and tag labeling,thus forming the JSP files. The JSP is a Java for Web Servlet

(developer offers a simple,consistent mechanism,to expand the Web server

functions,and the business system has expanded,the interactive) are executed on

the server and the client is usually return an HTML text,so the client browser can

browse as. It will be a Java script writing part is embedded into the dynamic

ordinary HTML or XML a page. A complete Web application by three layers: Web

server,Servlet engine and Jsp engine. When Web application server first received

the JSP page,first by the JSP engine pretreatment and change the Servlet Java,and

stored in the server's memory (which makes in the next to the call,the server page

will have very quick response),after Servlet engine running,along with JSP files.

The HTML code returned to customers together. Insert the Java program can

operate database,directional pages,in order to realize a dynamic pages required

1

大连交通大学2008届本科生毕业设计(论文)外文翻译

functions.

Jsp language comparative analysis

The dynamic web development early technology is used IN CGI interface - B.

The development of technology of serious problems exist - each new CGI

programs in a new requirements on the server. If multiple concurrent users access

to this procedure,these processes will deplete the Web server of all available

resources,until its collapse.

In order to overcome the disadvantages of Microsoft,put forward the Active

Server mix (ASP) technology,this technology using "plug-in" and the API simplifies

Web applications of development,can produce and the operation of the dynamic

interaction,and high-performance Web service applications. Compared with CGI

ASP,its advantage is to contain HTML tags,can direct access database and use the

ActiveX controls,infinite expansion in the programming of more flexible. But the

technology is basically confined to Microsoft operating system platform.

Hypertext Preprocessor (Hypertext Preprocessor facilities),namely web

development technology and dynamic PHP,ASP similar embedded HTML

document is a server-side scripting language. PHP in most Unix/Linux

platform,GUN and Microsoft Windows platforms can run. PHP advantages of

convenient installation,mainly has: the learning process is simple,Database

connection convenient,good compatibility,Extensible,Can undertake

object-oriented programming,etc. But there are also some PHP weaknesses,first

PHP is an explanation of the language,not supports multi-threading structure.

2

大连交通大学2008届本科生毕业设计(论文)外文翻译

Secondly,the lack of multi-layer structure support. Again,PHP database interfaces

provide support,this makes it for some e-commerce applications,PHP is not

suitable. Sun Microsystems (from Inc1) on a Web server Microsystems,application

server,trading system and development tool widely support and cooperation

between suppliers,integration and balance the already existing programming

environment for Java (for example JavaServlets and Jav2aBeans) support

techniques and tools after a new and developing method based on Web

applications - JavaServer mix technology (JSP). Compared with over several

languages,JSP certain advantages: first,the JSP to be efficient and better safety: JSP

in before has been compiled into the bytecode (an uploaded file code),from Java

virtual machine bytecode VirtualMachine (Java implementation,explain the source

of high efficiency than explanation,Server bytecode and the Cache mechanism,can

improve the efficiency of the bytecode visit. The first call JSP page may be a bit

slow,because it has been compiled into the Cache,then much faster. At the same

time,the JSP source program is unlikely to be downloaded,especially JavaBean

program can not put the foreign directory. Secondly,the JSP have more extensive

operation platform,can be on any Web server or applications from a platform to

another platform,JSP and JavaBean even without recompiling the,because the Java

bytecode are standard and platform irrelevant,Again,the JSP components

(Component) way more convenient,ASP through to expand the COM complex

functions,such as file upload,sending email and processing or complex calculation

isolated become independent reusable module. The JSP JavaBean through was the

same function expansion. In development,development of COM than JavaBean

complex and trival,from this can be seen in the example above JavaBean

development is very convenient. In the maintenance,the COM must be registered

3

大连交通大学2008届本科生毕业设计(论文)外文翻译

with the server,if changed the COM program,you must register,even to shutdown

and restart. Registration is not needed,JavaBean CLASSPATH on the list contains.

Additionally,the OOP JavaBean is completely according to different business

processing can be conveniently function established a reusable libraries of

objects,such as user access control,automatic reply email,etc.

Jsp technical analysis

(1) the generation and display to separate

Use the JSP technology,Web page developers can use HTML or XML logo

design and formatting pages,and eventually use JSP logo or feet was generated

page dynamic content. Because the core logic is enclosed in a logo and

JavaBeans,so the Web page designers,management and able to edit and use the

JSP page without affecting the content. In the server JSP engines interpret JSP

logo and scripts,generating the request,and will result in HTML page (or XML) sent

to the browser. It helps to protect their code,the authors also can ensure based on

any HTML Web browser fully usability.

(2) reusable components

Most JSP page depends on the reusable component,cross-platform JavaBeans

Enterp rise (or JavaBeans components) to execute the application requirements of

complicated processing. Developers can exchange and sharing the common

operation execution component,or to make these components for more users and

4

大连交通大学2008届本科生毕业设计(论文)外文翻译

customer groups. Component based method,and accelerate the overall

development and make various organizations in their existing skills and optimize

the development efforts in the balance.

(3) using logo

Web page is not familiar with the developer of the scripting language

programmer. The JSP wrapping the many function,these functions are easy,and JSP

related XML identification of dynamic content generation need. Through the

development,logo can be further expanded. Technical JSP Third-party developers

and other personnel for the common functions create their own logo,Web page

which developers can use the tools and familiar with the same as identifier to

perform specific functions of components for work.

(4) to the platform

Almost all the platform supports a Java,JSP + JavaBeans can almost in all the

workbench came unstuck. From a platform to another platform,JSP and JavaBeans

even without recompiling the bytecode Java,because is the standard with the

platform.

(5) database connection

Connect to the database technology in Java,Java program is JDBC driver and

via JDBC database query,extracting data,etc. Sun microsystem companies have

5

大连交通大学2008届本科生毕业设计(论文)外文翻译

also developed JDBC - use this technology bridge ODBC,Java program can access

the database with ODBC driver,most current database system with ODBC driver,so

can visit program such as Oracle Java Sybase,MS SQL Server,database and MS

Ac2cess etc.

(6) use Java advantage

Because the JSP page built-in scripting language is based on Java,and all the

JSP page were compiled Servlets Java,so as the JSP page with Java

technologies,including all good storage management and safety of robust and can

support the highly complex based on Web applications. As part of the platform of

Java,JSP has written a Java programming language ","characteristics of operation.

The JSP technology integration to a variety of easy application system structure,in

order to take advantage of existing skills and tools,and can be extended to support

the distributed applications software.

外文翻译

Jsp现状分析

——

/page/ffb4d8ea-5aba-41bf-933d-1cf6a940c0c7

原理分析

6

大连交通大学2008届本科生毕业设计(论文)外文翻译

JSP ( JavaServer Pages) 是由Sun Microsystems公司倡导、许多公司参与一起建立

的一种动态网页技术标准。JSP技术是在传统的网页HTML文件中插入Java程序段和JSP标

记,从而形成JSP文件。JSP是Java Servlet ( Servlet为Web开发员提供了一个简单、一致

的机制,来扩展Web服务器的功能,并且和已有的业务系统交互) 的扩展,是在服务器端

执行的,通常返回该客户端的就是一个HTML文本,因此客户端只要有浏览器就能浏览。

它将Java脚本编写的动态部分嵌入到普通的HTML或XML网页中。一个完整的Web应用由

三层构成:Web服务器,Servlet引擎和J sp引擎。当Web应用程序服务器第一次收到JSP

页面时,先由JSP引擎预处理并转换成Java Servlet,并且存储在服务器的内存中(这就使得

在接下来的对该页面的调用中,服务器会有非常快的响应) ,经过servlet引擎运行,将执

行结果连同JSP 文件中的

HTML代码一起返回给客户。插入的Java程序段可以操作数据库、重新定向网页等,

以实现建立动态网页所需要的功能。

语言比较分析

早期的动态网站开发技术使用的是CGI - B IN接口。这种开发技术存在着严重的扩展

性问题———每一个新的CGI程序要求在服务器上新增一个进程。如果多个用户并发地访

问该程序,这些进程将耗尽该Web服务器所有的可用资源,直至其崩溃。

为克服这一弊端,微软公司提出了Active Server Pages (ASP)技术,该技术利用“插

件”和API简化了Web应用程序的开发,可以产生和运行动态的、交互的、高性能的WEB 服

务应用程序。ASP与CGI相比,其优点是可以包含HTML标签,可以直接存取数据库及使用

无限扩充的ActiveX控件,因此在程序编制上更富有灵活性。但该技术基本上是局限于微软

的操作系统平台之上。Hypertext Preprocessor (超文本预处理器) ,即PHP动态网站开

7

大连交通大学2008届本科生毕业设计(论文)外文翻译

发技术与ASP相似,也是一种嵌入HTML 文档的服务器端脚本语言。PHP在大多数Unix平

台、GUN /Linux和微软Windows平台上均可以运行。PHP的优点主要有:安装方便,学

习过程简单; 数据库连接方便,兼容性强; 扩展性强;可以进行面向对象编程等。但PHP

也存在一些弱点,首先PHP是一种解释型语言,不支持多线程结构。其次,缺乏多层结构

支持。再次,PHP提供的数据库接口支持不统一,这就使得它对于某些电子商务应用来说,

PHP是不适合的。太阳微系统公司( Sun Microsystems Inc1) 在Web服务器、应用服务器、

交易系统以及开发工具供应商间广泛支持与合作下,整合并平衡了已经存在的对Java编程

环境(例如JavaServlets和Jav2aBeans) 进行支持的技术和工具后产生了一种新的、开发基

于Web应用程序的方法——JavaServer Pages技术( JSP) 。相比以上几种语言,jsp具有

一定的优势:首先,JSP具有更高的效率和更好安全性: JSP在执行以前被编译成字节码

(byte code),字节码由Java虚拟机(Java Virtual Machine)解释执行,比源码解释的效率

高;服务器上还有字节码的Cache机制,能提高字节码的访问效率。第一次调用JSP网页可

能稍慢,因为它被编译成Cache,以后就快得多了。同时,JSP源程序不大可能被下载,特

别是JavaBean程序完全可以放到不对外的目录中。其次,jsp有更广泛的运行平台:能够

在任何Web或应用程序服务器上运行,从一个平台移植到另外一个平台,JSP和JavaBean

甚至不用重新编译,因为Java字节码都是标准的与平台无关的;再次,JSP的组件

(Component) 方式更方便,ASP通过COM来扩充复杂的功能,如文件上载、发送email

以及将业务处理或者复杂计算分离出来成为独立可重复利用的模块。JSP通过JavaBean实

现了同样的功能扩充。在开发方面,COM的开发远比JavaBean复杂和繁琐,从本文上述

示例中可以看出开发JavaBean很方便。在维护方面,COM必须在服务器上注册,如果修

改了COM程序,就必须重新注册,甚至必须关机和重新启动。JavaBean 则不需要注册,

放在CLASSPATH包含的目录中就行了。另外JavaBean是完全的OOP,可以针对不同的业

务处理功能方便地建立一整套可重复利用的对象库,例如用户权限控制、email自动回复等

等。

8

大连交通大学2008届本科生毕业设计(论文)外文翻译

技术分析

(1)将内容的生成和显示进行分离

用JSP技术,Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页

面,并使用JSP标识或者小脚本来生成页面上的动态内容。由于核心逻辑被封装在标识和

JavaBeans中,所以Web管理人员和页面设计者,能够编辑和使用JSP页面,而不影响内容

的生成。在服务器端,JSP引擎解释JSP标识和脚本,生成所请求的内容,并且将结果以HTML

(或者XML)页面的形式发送回浏览器。这既有助于作者保护自己的代码,又能保证任何基

于HTML的Web浏览器的完全可用性。

(2)可重用组件

绝大多数JSP页面依赖于可重用的、跨平台的组件( JavaBeans或者Enterprise

JavaBeans组件) 来执行应用程序所要求的复杂的处理。开发人员能够共享和交换执行普通

操作的组件,或者使得这些组件为更多的使用者和客户团体所使用。基于组件的方法加速

了总体开发过程,并且使得各种组织在他们现有的技能和优化结果的开发努力中得到平衡。

(3)采用标识

Web页面开发人员不会都是熟悉脚本语言的编程人员。JSP技术封装了许多功能,这

些功能是在易用的、与JSP相关的XML标识中进行动态内容生成所需要的。通过开发标识

库,JSP技术可以进一步扩展。第三方开发人员和其他人员可以为常用功能创建自己的标识

库,这使得Web页面开发人员能够使用熟悉的工具和如同标识一样的执行特定功能的构件

来进行工作。

9

大连交通大学2008届本科生毕业设计(论文)外文翻译

(4)适应平台

几乎所有平台都支持Java,JSP + JavaBeans几乎可以在所有平台下通行无阻。从一

个平台移植到另外一个平台,JSP和JavaBeans甚至不用重新编译,因为Java字节码都是标

准的与平台无关的。

(5)数据库连接

Java中连接数据库的技术是JDBC,Java程序通过JDBC驱动程序与数据库相连,执行

查询、提取数据等操作。Sun公司还开发了JDBC - ODBC bridge,利用此技术Java程序可

以访问带有ODBC驱动程序的数据库,目前大多数数据库系统都带有ODBC驱动程序,所

以Java程序能访问诸如Oracle、Sybase、MS SQL Server和MS Ac2cess等数据库。

(6)利用java优势

由于JSP页面的内置脚本语言是基于Java的,而且所有的JSP页面都被编译成为Java

Servlets,所以JSP页面具有Java技术的所有好处,包括健壮的存储管理和安全性,能够支

持高度复杂的基于Web的应用。作为Java平台的一部分,JSP拥有Java编程语言“一次编

写,各处运行”的特点。JSP技术很容易整合到多种应用体系结构中,以利用现存的工具和

技巧,并且能扩展到支持企业级的分布式应用中。

10


本文标签: 技术 页面 服务器 动态 标识