面向多3D打印设备的运行状态集中管理平台的设计与实现外文翻译资料

 2022-10-24 09:10

0verview of JSP Technology and JSP application frameworks

Author: Zambon Giulio/ SeklerMichael

Source: Springer-Verlag NewYork Inc

The Java Server Pages( JSP) is a kind of according to web of the script plait

distance technique, similar carries the script language of Java in the server of the Netscape company of server_ side JavaScript( SSJS) and the Active Server Pages(ASP) of the Microsoft. JSP compares the SSJS and ASP to have better can expand sex, and it is no more exclusive than any factory or some one particular server of Web. Though the norm of JSP is to be draw up by the Sun company of, any factory can carry out the JSP on own system.

The After Sun release the JSP( the Java Server Pages) formally, the this kind of

New Web application deve1opment technique very quickly caused the peoples concern. JSP provided a special deve1opment environment for the Web application that establishes the high dynamic state. According to the Sun parlance, the JSP can adapt to include the Apache Web Server, IIS4,0 on the market at inside of 85% server product.

This chapter wi11 introduce the related knowledge of JSP and Databases, and JavaBean related contents, is all certainly rougher introduction among them basic contents, say perhaps to is a Guide only, if the reader needs the more detailed information, pleasing the book of consult the homo1ogous JSP。

1. Benefits of JSP

The JSP(Java Server Pages) is from the company of Sun Microsystems initiate,,the many companies the participate to the build up the together of the a kind the of dynamic the state web the page technique standard, the it have the it in the construction the of the dynamic state the web page the strong but the do not the especia11y of the function. JSP and the technique of ASP of the Microsoft is very alike. Both a11 provide the ability that mixes with a certain procedure code and is explain by the language engine to carry out the procedure code in the code of HTML. Underneath we are simple of carry on the introduction to it.

JSP pages are translated into servlets. So, fundamenta11y, any task JSP pages can

perform could also be accomplished by servlets. However, this underlying equivalence does not mean that servlets and JSP pages are equa11y appropriate in a11 scenarios. T he issue is not the power of the techno1ogy, it is the convenience, productivity, and maintain ability of one or the other After a11, anything you can do on a particular compute r platform in the Java programming language you could also do in assembly language. But it still matters which you choose.

1.l JSP provides the following benefits over servlets alone:

It is easier to write and maintain the HTML. Your static code is ordinary HTM

L: no extra backslashes, no double quotes, and no lurking Java syntax.

· You can use standard Website deve1opment tools. Even HTML tools that know nothing about JSP can be used because they simply ignore the JSP tags.

· You can divide up your deve1opment team. The Java programmers can work on the dynamic code. The Web deve1opers can concentrate on the presentation layer. 0nlarge projects, this division is very important. Depending on the size of your team and the complexity of your project, you can enforce a weaker or stronger separation between the static HTML and the dynamic content.

Now, this discussion is not to say that you should stop using servlets and use on1y JSP instead. By no means. Almost a11 projects wi11 use both. For some requests in your project, you wi11 use servlets. For others, you will use JSP. For sti11 others, you wi1l combine them with the MVC architecture. You want the appropriate too1 for the job, and servlets, by themselves, do not complete your toolkit.

l.2 JSP CHARACTERISTICS

Is a service according to the script language in some one language of the statures system this kind of discuss, the JSP should be see make is a kind of script language. However, be a kind of script language, the JSP seemed to be too strong again, almost can use a11 Javas in the JSP.

Be a kind of according to text origina11y of, take manifestation as the centra1 deve1opment technique, the JSP provideda11 advantages of the Java Servlet, and, when combine with a JavaBeans together, providing a kind of make contents and manifestation that simple way that1ogic separate. Separate the contents and advantage o「1ogica1 manifestations is, the personnel who renews the page externa1 appearance need not know the code of Java, and renew the JavaBeans personnel also need not be design the web page of expert in hand, can use to take the page of JavaBeans JSP to define the template of Web, to build up a from have the alike externa1 appearance of the website that page constitute. JavaBeans completes the data to provide, having no code of Java in the template thus, this means that these templates can be written the personne1 by a HTML plait to support. Certainly, can also make use of the Java Servlet to contro1 the1ogic of the website, adjust through the Java Servlet to use the way of the document of JSP to separate website of 1ogic and contents.

Genera11y speaking, in actua1 engine of JSP, the page of JSP is the edit and translate type while carry out, not explain the type of. Explain the dynamic state web page deve1opment tool of the type, such as ASP, PHP3 etc., because speed etc

reason, have already cant satisfy current the large electronic commerce needs appliedly, traditiona1 deve1opment techniques are all at to edit and translate the executive way change,such as the ASP→ ASP ;PHP3→ PHP4.

In the JSP norm book, did not request the procedure in the JSP code part( be ca1led the Scriptlet) and must write with the Java definitely. Actua1ly, have some engines of JSP are adoptive other script languages such as the EMAC-Script, etc., but actua11y this a few script languages also are to set up on the Java, ed

剩余内容已隐藏,支付完成后下载完整资料


JSP 技术概述与应用框架

作者: Zambon, Giulio/ SekIer, Michael 出处: Springer-Verlag New York Inc

Java Server Pages(JSP)是一种基于web的脚本编程技术, 类似于网景公司的服务器端 Java脚本语言server-side JavaScript(SSJS)和微软的 Active Server Pages(ASP)。与SSJS和ASP相比, JSP具有更好的可扩展性,并且它不专属子任何一家厂商或某一特定的 Web服务器。尽管 JSP规范是由 Sun公司-制定的, 但任何厂商都可以在自己的系统上实现JSP。

在Sun正式发布 JSP(Java Server Pages)之后,这种新的Web应用开发技术很快引起了人们的关注。JSP为创建高度动态的 web应用提供了一个独特的开发环境。按照Sun的说法, JSP能够适应市场上包括 Apache WebServer、 nS4.0在内的85%的服务器产品。

本文将介绍JSP相关的知识,以及JavaBean的相关内容,当然都是比较粗略的介绍其中的基本内容, 仅仅起到抛砖引玉的作用, 如果读者需要更详细的信息, 请参考相应的JSP的书籍。

一、JSP的好处

JSP(Java Server Pages)是由 Sun Microsystems公司侣导、 许多公司参与一起建立的- -种动态网 更技术标准, 其在动态网更的建设中有其强大而特别的功能。JSP与Microsoft的ASP技术非常相似。两者都提供在 HTML代石马中温合某种程序代码、 由语言引擊解释执行程序代码的能力。下面我们简単的对它进行介绍 。

JSP页面最终会转换成servler。因而,从根本上, JSP页面能够执行的任何任务都可以用ervler来完成。然而,这种底层的等同性并不意味者servler和JSP更面对于所有的情況都等同适用。问题不在于技术的能力, 而是二者在便利性、生产率和可维护性上的不同。毕竟, 在特定平台上能够用 Java编程语言完成的事情, 同样可以用汇编语言来完成, 但是选择哪种语言依旧十分重要。

l.l和单独使用servler相比, JSP提供下述好处:

JSP中 HTML的编写与维护更为简单。JSP中可以使用常规的HTML:没有额外的反斜杠, 投有额外的双引号, 也没有暗含的Java语法。

·能够使用标准的网站开发工具 。即使对那些对 JsP一无所知的HTML工具, 我们也可以使用, 因为它们会忽略 JSP标签(JSPtags)。

·可以对开发团队进行划分。Java程序员可以致力于动态代码。Web开发人员可以将经理集中在表示层(presentation layer)上。对于大型的项目,这种划分极为重要。依据开发团队的大小,及项目的复杂程度,可以对静态 HTML和动态内容进行弱分离 (weaker separation) 和强分离 ( stronger separation)。

在此,这个讨论并不是让您停止使用 servlets,只使用JSP。几乎所有的项目都会同时用到这两种技术。针对项目中的菜些请求, 您可能会在 MvC构架下组合使用这西项技术。我们总是希望用适当的工具完成相对应的工作, 仅仅servlet并不能填满您的工具箱 。

l.2 JSP的特点

按照脚本语言是服务于某一个子系统的语言这种论述, JsP应当被看作是一 种脚本语言。然而,作为一种脚本语言, JsP又显得过于强大了,在JsP中几乎可以使用全部的 Java类。

作为一种基于文本的、以显示为中心的开发技术, JSP提供了 Java Servlet 的所有好处,并且,当与一个 JavaBeans类结合在一起时, JSP提供了一种使内容和显示逻辑分开的简单方式。分开内容和显示逻辑的好处是, 更新更面外观的人员不必懂得 Java代码,而更新 JavaBeans类的人员也不必是设计网页的行家里手,就可以用带 JavaBeans类的 JSP页面来定义 Web模板, 以建立一个由具有相似的外观的页面组成的网站。 JavaBeans类完成数据提供,这样在模板中就没有Java代石马,这意味者这些模板可以由一个 HTML编写人员来维护。当然,也可以利用 Java Servlet来控制网站的逻辑, 通过 Java Servlet调用 JSP文件的方式来将网站的逻辑和内容分高 。

一般来说,在实际的 JSP引擎中, JSP页面在执行时是编译式,而不是解释式的。解释式的动态网页开发工具如 ASP、 PHP3等由于速度等原因已经满足不了当前大型电子商务应用的需要了,传统的开发技术都在向编译执行的方式改变, 如ASP→ASP , PHP3→PHP4。

在 JSP规范书中,并没有明确要求 JSP中的程序代码部分(称为 Scriptlet)- 定要用 Java来写。实际上,有一些 JSP引擊就是釆用的其他脚本语言,如EMAC-Script、 WebL等, 但实际上这儿种脚本i語言也是构建在 Java上面, 编译为 Servlet来实现的。按照 JSP规范书写, 和 Java没有任何关系的 Scriptlet也是可以的,不过,由于 JSP的强大功能主要在于能和 JavaBeans、Enterprise JavaBeans 共同运转,所以即使是 Scriptlet部分不使用 Java,编译成的执行代码也应该是与Java相关的 。

二、 JSP相对于竞争技术的优势

许多年前, Marty 受到邀请,参加一个有关软件技术的小型(20 个人)研讨会, 做在 Marty旁边的人是 James Gosling--- Java编程语言的发明者。 隔几个位置,是来自华盛顿一家大型软件公司的高级经理。 在讨论过程中,研讨会的主席提出了Jini的议题,这在当时是一项新的 Java技术.主席向该经理询问他的想法.他继续说, 他们会持续关注这项技术,如果这项技术变得流行起来,他们会遵循公司的 “接受并扩充(embrace and extend)”的策略.此时, Gosling随意地插话说“你的意思其实就是不接受且不扩充(disgrace and distend)。

在此, Gosnng的抱怨显示出,他感到这个公司会从其他公司那里拿走技术, 用于他们自己的目的.但你猜这次怎么样?这次鞋子穿在了另一只脚上。 Java社团没有发明这一思想一一将页面设计成由静态 HTML和用特殊标签标记的动态代码混合组成。 ColdFusion多年前就已经这样做了。甚至 ASP(来自于前述经理所在公司的一项产品)都在 JSP出现之前推广了这种方式。实际上,JSP不只采用了这种通用概念,它甚至使用许多和 AsP相同的特殊标签。

因此,同題变成:为什么使用 JsP,而不使用其他技术呢?我们的第一反应是我们不是在争论所有的人应该做什么。其他这些技术中,有一些也很不错,在某些情况下也的确是合情合理的选择.然而,在其他情形中,JsP 明显要更好一些 。

下面给出几个理由:

2.l与.NET和 Active ServerPages(ASP)相比

NET是 Microsoft精心设计的- 一项技术。 ASP.NET是与 servlets和 JSP直接竞争的技本。 JSP的优势体现在西个方面。 首先,JSP可以移植到多种操作系统和web服务器,您不必仅仅局限一部分在 windows 和 ns上尽管核心.NET平台可以在好几种非 windows平台上运行, 但 ASP这一部分不可以。 您不能期望可以将重要的 ASP.NET应用部署到多种服务器和操作系统。对于某些应用,这种差异投有什么影响。1有些应用,这种差异却非常重要。其次,对于某些应用,底层语言的选择至关重要。例如,尽管.NET的 C#语言设计优良,且和 Java类似, 但熟悉核心 C#语法和众多工具库的程序员很少 。 此外,许多开发者依旧使用最初版本的 AsP。相对于这个版本,JSP在动态代石马方面拥有明显的优势。使用 JSP, 动态部分是用 Java编写的,而非 VB Script过其他 ASP专有的语言,因此 JSP更为强劲,更适合于要求组件重用的复杂应用 。

当将 JSP与之前版本的 Cold Fusion对比时,您可能会得到相同的结论。应用 JSP,您可以使用 Java编写“真正的代码”不必依赖子特定的服务器产品。 然而, 当前版本的 Cold Fusion满是 J2EE服务器的环境, 允许开发者容易的混合使用 Cold Fusion和 Servlet/JSP。

2.2 与PHP相比

PHP(“PHP: Hypertext Preprocessor”的递归字母缩写词)是免费的、开放源代石号的、 HTML嵌入其中的脚本i語言, 与ASP和JSP都有某种程度的类似。 JSP的一项优势是型f态部分用Java编写,而 Java已经在E1关网、数据库访问、分布式对象等方面相有广泛的 API,而 PHP需要学习全新的、应用相对广、泛的语言。 JsP的第二项优势是,和 PHP相比, JSP测有极为广泛的工具和服务器提供商的支持。

2.3与纯 Servlet相比

原则上, JSP并没有提供 Servlet不能完成的功能。实际上, JSP文档在后台被自动转换成 Servlet。但是编写(和修改)常规的 HTML,要比无数 println语句生成 HTML要方便得多。另外,通过将表示与内容分高,可以为不同的人分配不同的任务:网页设计人员使用熟悉的工具构建HTML,要么为 Servlet程序员留出空间插入动态内容, 要么通过 xML标签间接调用动态内容。 这是否表示您只可以学习 JSP,将 Servlet丢到一边呢?当然不是!由于以下4种原因, JSP 开发人员需要了解 Servlet:

(1) JSP页面会转換成 Servlet。 不了解 Servlet就无法知道 JSP如何工作。

(2) JSP由静态 HTML、专用的 JSP标签和 Java代石马组成。明K种类型的 Java 代石马呢?当然是 Servlet代石马!如果不了解 Servlet编程, 那么就无法编写这种代码。

(3) 一些任务用 Servlet完成比用 JSP来完成要好。 JSP擅长生成由大量组织有序的结构化 HTML或其他字符数据组成的页面 。 Servlet擅-tt生成二进制数据, 构建结构多样的员面, 以及执行输出很少或者没有输出的任务 (比如重定向)。

(4)有些任务更适合于组合使用 Servlet和 JSP来完成,而非单独使用 Servlet 或 JSP。

2.4 与 JavaScript相比

JavaScript和 Java编程语言完全是两码事, 前者一般用于在客尸端动态生成HTML, 在測览器载入文档时构建网页的部分内容。 这是一项有用的功能, 一般与 JsP的功能(只在服务器端运行)并不发生重叠。和常规 HTML员面- 一样, JSP页面依l日可以包括用于 JavaScript的 SCRIPT标签。实际上, JSP甚至能够用来动态生成发送到客,J端的 JavaScript。因此, JavaScript不是一项竞争技术,它是一项补充技术。 JavaScript也可以用在服务器端,最因人注意的是 SuN ONE

(以前的iPlanet)、 IIS和BroadVision服务器。然而, Java更为强大灵活、可靠且可移植 。

2.5与 WebMacro和 VeIocity相比

JsP决非完美。许多人都曾指出过 JsP中能够改进的功能。这是一件好事, JsP的优势之一是该规范由许多不同公司组成的社团控制 。 因此, 在后续版本中, 这项技术能够得到协调的改进。

但是, 一些组织已经开发出了基于 Java的替代技本,试图弥补这些不足。 据我们的判断,这样做是错误的。使用扩充 JSP和 Servlet技术的第三方工具, 如Apache Structs,是一种很好的思路,只要该工具带来的好处能够补偿工具带来的额外复杂性。但是,试图使用非标准的工具代替 JsP则不理想。在选择一项技术时,需要权衡许多方面的因素:标准化、可移植性、集成性、行业支持和技术特性。对于 JsP替代技术的争论几乎只是集中在技术特性上,而可移植性、标准化和集成性也十分重要。例如, Servlet和 JSP规范为 Web应用定义了一个标准的日最结构, 并提供用于部署 Web应用的标准文件(.war 文件)。所有 JSP兼容的服务器必多员支持这些标准 。 我们可以建立过、i慮器作用到任意树木的 Servlet 和 JSP更面上, 不能用于非标准资源。Web应用安全设資也同样如此。

此外, 业界对 JSP和 Servlet技术的E大支持使得这两项技术都有了Ei大的进步,从而減轻了对 JsP的许多批评。例如, JsP标准标签库和 JsP2.0表达式i語言解决了两种最广泛的批评:缺乏良好的达代结构;不使用显式的 Java代石马或冗长的 jsp:useBean元素难以访问动态结果 。

三、对JSP的误解

1.JsP技术是服务器端技术

下面是 Marty收到的一些典型l同题 (大部分l同题不.l 上一次的出现) 。

·我们的服务器正在运行 JDK1.4。我如何将 Swing组件用到 JSP页面呢?

我如何将图像放到 JsP 页面中? 我不知道读取图像文件应该使用哪些JavaI/0命令。

· Tomcat不支持 JavaScript,当用户在图像上移动鼠标时,我如何使图像突出显示呢?

我们的客户使用不理解 JSP的旧浏览器。 我应该怎么做?

当我们的客户在浏览器中使用“ViewSource”(査看源代码)时,如何阻止他们看到 JSP标签?

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[152475],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。