JSP技术与主流JAVA EE开源外文翻译资料

 2022-08-27 10:17:05

JSP Technology and Mainstream Open-source Framework for JAVAEE

1. JSP Profile

JSP (Java Server Pages) is initiated by Sun Microsystems, Inc., with many companies to participate in the establishment of a dynamic web page technical standards. JSP technology somewhat similar to ASP technology, it is in the traditional HTML web page document (*.html, *. html) to insert the Java programming paragraph and JSP tag (tag), thus 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 processing 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 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 establishment 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 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 return to the 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 mainly for all the characteristics of 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 or 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 server to numerous servers, Java shows a tremendous Vitality. (4) diver classsification 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 technology 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 memory, 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.

2. J2EE Development Framework

Java2 Enterprise Edition middleware unified ideology played a significant role. For example, J2EE for distributed transaction management, directory services and messaging services provide a standard programming interface. J2EE-based -Java2Standard Edition (J2SE), successfully access for Java provides a standard relational database.

But, as this article 'J2EE programming of the lack of support', as mentioned, J2EEplatform does not provide a satisfactory application programming model. Sun and some of the major application server vendors wanted to use the development tools to reduce the complexity of J2EE development, but these tools are no other outstanding JAVA development tools, which have advanced refactoring tools, and. NET platform compared, J2EE tool support appeared to be very inferior.

Many J2EE development tools automatically generate the code for the same complex as the tools themselves. In many small-scale J2EE open source community developers chose another way of development - some can be difficult to reduce the development of J2EE development framework, the more popular such as: Struts, Hibernate, and Spring Framework, J2EE project types in many of today they play an important the role.

2.1 Spring Framework

The Spring Framework is an open source application framework for the Java platform.

The first version was written by Rod Johnson who released the framework with the publication of his book Expert One-on-One J2EE Design and Development in October 2002. The framework was first released under the Apache 2.0 license in June 2003. The first milestone release, 1.0, was released in March 2004, with further milestone releases in September 2004 and March 2005. The Spring 1.2.6 framework won a Jolt productivity award and a JAX Innovation Award in 2006. Spring 2.0 was released in October 2006, and Spring 2.5 in November 2007. In December 2009 version 3.0 GA was released. The current version is 3.0.5.

The core features of the Spring Framework can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the Spring Frame

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


附录A 译文

JSP技术与主流JAVA EE开源

1.JSP 配置文件

JSP (Java 服务器页) 是由 Sun Microsystems,Inc发起与许多公司参与建立动态网页技术标准。JSP 技术有点类似于 ASP 技术,它是在传统的 HTML web 页的文档插入 Java 编程段和 JSP 标记 (tag),因而 JSP 文件 (*.jsp)。采用 JSP 开发的 Web 应用程序是跨平台的可以在 Linux 上运行,也可用于其他操作系统。

JSP 技术,使用 Java 编程语言编写的类别的 XML 标记和脚本,产生动态页面包处理逻辑。JSP 页面逻辑和网页设计和显示分离,支持可重用的基于组件的设计、 基于 Web 的应用程序开发是快速和容易。

面对访问 JSP 页面请求的 web 服务器,第一次执行程序后和 JSP 文件中向客户返回的 HTML 代码的执行结果。插入的 Java 编程操作的数据库可以重新导向的网站,以实现建立运作所需的动态页面。JSP 和 Java Servlet 是在服务器的实现,通常返回到客户端是 HTML 文本,只要客户端浏览器将能够访问。

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 技术简单易用、 完全面向对象,和一个独立于平台和主要安全为互联网的所有特性。JSP 技术实力: (1) 有时间来准备,在这一点 Java 比 PHP更好。除了系统,代码未进行任何更改。(2) 多平台支持。基本上在所有平台上的任何开发环境中,在任何环境中部署在任何环境中扩展。比较 ASP / PHP 的局限性是显而易见的。(3) 较强的可扩展性。从只有小的 Jar 文件可以运行 Servlet / JSP,到多个服务器群集和负载平衡,到多个应用程序事务处理、 信息加工、 服务器到大量的服务器,Java 显示出巨大的生命力。(4) 潜水员分类和功能强大的开发工具支持。这是类似于 ASP,Java 已经有很多很好的开发工具,和很多人可以是免费的其中许多人已经能够在各种平台下运行。

JSP 技术脆弱部分:(1) 同样的 ASP,Java 的优点是其致命的问题。这是因为为了跨平台功能,以极端的伸展能力,大大提高产品的复杂程度。(2) Java 速度是类来完成永久的记忆,所以在某些情况下的内存相比,用户数目的使用确实是'性能价格比最低'。另一方面,它也需要磁盘空间来存储一系列。Java 文件和类,以及相应版本的文档。

2.J2EE 开发框架

Java2 企业版中间件统一思想发挥了重要作用。例如,J2EE 分布式的事务管理、目录服务和消息服务提供了一个标准的编程接口。基于 J2EE 的-Java2Standard 版 (J2SE),成功地获得 Java 提供了标准的关系数据库。

但是,作为这篇文章'J2EE 编程的缺乏支持',如所述,J2EE 平台不提供令人满意的应用程序的编程模型。太阳和一些主要的应用程序服务器供应商想要使用的开发工具来降低复杂性的 J2EE 开发,但这些工具是没有其他优秀 JAVA 开发工具,它拥有先进的重构工具,和网络平台相比,J2EE 工具支持似乎很自卑。

很多 J2EE 开发工具自动生成的代码为作为工具本身一样复杂。在许多小规模 J2EE 开源社区开发者选择另一种方式的发展 — — 一些可能很难降低 J2EE 开发框架,更受欢迎的发展如: Struts,休眠和 Spring框架,J2EE 项目类型在许多今天它们发挥重要的作用。

2.1 spring 框架

Spring 框架是 Java 平台开放源代码应用程序框架。

第一个版本是书面的杆约翰逊世卫组织发表与出版他的书专家一对一的 J2EE 设计框架和发展 2002 年 10 月。框架在 2003 年 6 月首次在Apache 2.0 许可证下发布。2004 年 3 月,发布了首个里程碑版本,1.0,进一步里程碑发布在 2004 年 9 月和 2005 年 3 月。Spring 1.2.6 框架2006 年获得了颠簸生产力奖和 JAX 创新奖。Spring 2.0 公布了 2006 年 10 月,和Spring 2.5 2007 年 11 月。2009 年 12 月版本 3.0 GA 被释放了。当前版本是 3.0.5。

Spring 框架的核心功能可以采用任何 Java 应用程序,但有构建在 Java EE 平台上的 web 应用程序的扩展名。虽然 Spring 框架不强加任何特定的编程模型,它已成为流行在 Java 社区,作为替代,替代或甚至增添企业 JavaBean (EJB) 模型。

Spring 框架包括几个模块,提供一系列服务:

反演的控件容器: 应用程序组件的配置和生命周期管理的 Java 对象面向方面编程: 使执行交叉例程数据访问: 使用 JDBC 和对象关系映射工具在 Java 平台上工作的关系数据库管理系统事务管理: 结合几个事务管理 Api 和协调为 Java 对象的事务模型-视图-控制器: HTTP 和基于 Servlet 的框架提供的扩展和自定义的钩子远程访问框架: 结构 RPC 样式导出和导入的 Java 对象在网络支持 RMI、 CORBA 和基于 HTTP 协议,包括 web 服务 (SOAP)公约》优于配置: 为基于 Spring 的企业应用程序的应用程序快速开发解决方案是弹簧模型中提供的。

批处理: 高容量处理具有可重用的框架

功能包括日志记录/跟踪,事务管理,处理统计工作,工作重新启动,跳过和资源管理。

身份验证和授权: 支持标准、 协议、 工具和做法的春季安全子项目通过一系列的可配置的安全流程。

远程管理: 结构暴露和 Java 对象为本地或远程配置通过 JMX 管理

消息传递: 构成性登记的透明消息消费从通过 JMS,改进通过标准的 JMS发送的消息队列的消息监听器对象

测试: 支持类编写单元测试和集成测试

反演控制容器到 Spring 框架是其控制反转容器,提供了一致的配置和管理 Java 对象使用回调方法。容器是负责管理对象的生命周期: 对象,调用初始化方法,通过创建和配置对象布线他们在一起。

由容器创建的对象也称为托管对象或豆类。通常情况下,容器是由加载包含 Bean 定义提供创建 bean 所需的信息的 XML 文件配置的。

对象可以通过查找依赖项或依赖注入。依赖项查找是一种模式在哪里调用方要求具有特定名称或特定类型的对象的容器对象。依赖注入是一种模式在哪里容器传递对象的名称到其他对象,通过构造函数、 属性或工厂方法。

在许多情况下它是不必要时使用 Spring 框架的其他部分使用容器,虽然使用它可能会使应用程序易于配置和自定义。Spring 容器提供一个一致的机制来配置应用程序,并与几乎所有 Java 环境,从小规模应用程序到大型企业应用程序集成。

Spring 框架被批评被一些人视为不是标准兼容。然而,Spring资源不见 EJB3 法规遵从性作为主要目标,并声称 Spring 框架和容器允许的更强大的编程模型。

面向方面编程组织架构Spring框架都有它自己的 AOP 框架的模块化方面的横切关注点。创建一个单独的 AOP 框架的动机来自于信念可能能够提供基本的 AOP 功能没有太多的设计、 执行或配置的复杂性。SAOP 框架也在 Spring 容器的充分利用。

Spring AOP 框架是截取的基础,并且在运行时配置。这会删除编译步骤或负载时织入的需要。另一方面,拦截只允许一个连接点上的现有对象上执行公共或受保护方法。

与AspectJ框架相比,Spring AOP 是那么强大但也不复杂。Spring 1.2 包括在容器中配置 AspectJ方面的支持。Spring 2.0 添加更多的整合与 AspectJ;例如,切入点语言重用,并且可以混合使用与基于 SpAOP 的方面。进一步,Spring 2.0 添加使用 AspectJ 来提供共同的Spring功能,例如声明性事务管理和依赖注入通过 AspectJ 编译时或加载时间编织一个Spring方面库。SpringSource 也使用 AspectJ AOP 在其他弹簧项目如Spring Roo 和Spring的洞察力,具有弹簧安全还提供基于 AspectJ 方面库。

Spring AOP使它能够使用 Spring框架内的横切关注点。可以使用 Spring AOP 丰富这是通过创建和配置容器的任何对象。

Spring 框架内部事务管理、 安全、 远程访问和 JMX 使用 Spring AOP。

自 2.0 版本的 framework,Spring 提供了两种方法对 AOP 配置: 架构-基于 approach.@AspectJ-based 批注的样式。

Spring 团队决定不引入新的 AOP 相关术语;因此,在Spring参考文档和 API,条款等方面,加入点,建议,切入点,介绍,目标对象 (劝对象),AOP 代理和编织所有具有相同的含义,大多数其他 AOP 框架 (特别是 AspectJ)。

当与数据库在应用程序中工作时,数据访问框架地址共同开发人员面临的困难。在 Java 中的访问框架的所有流行的数据,将提供支持: JDBC,iBatis,休眠,JDO JPA、 Oracle top link 作为,Apache OJB、 Apache 卡宴,除其他外。

对于所有这些受支持的框架,Spring 提供了这些功能:

资源管理-自动获取和释放数据库资源

异常处理-翻译数据访问相关的异常到Spring数据访问层次结构

交易参与-透明参与正在进行的事务处理

资源展开 — — 从连接池包装中检索数据库对象

BLOB 和 CLOB 处理的抽象

所有这些功能变得可用时使用由弹簧为每个受支持的框架提供的模板类。批评人士说,这些模板类侵入,并提供 (例如) 使用休眠 API 没有优势。直接打开。作为回应,Spring开发商取得可能直接使用休眠和 JPA Api。然而,这需要透明交易管理,作为应用程序代码不再承担责任,获得并关闭数据库资源,并且不支持异常翻译。

与 Spring 的事务管理,其数据访问框架提供了灵活的抽象,使用的数据访问框架。Spring 框架不会提供通用的数据访问 API;相反,所支持的 Api 全功率是保存完好。Spring 框架是 Java 提供了外部的应用程序服务器或容器托管的数据访问环境中可用的唯一框架。同时使用 Spring 的事务管理与休眠,以下都可能必须配置。

交易管理 framework Spring 事务管理框架带来了一种抽象机制到 Java 平台。其抽象是与当地和全球交易 (本地事务不需要应用程序服务器) 能够拆除与嵌套与 Java 平台的几乎所有环境中的事务 safe points working transactions working .working相比之下,JTA 只支持嵌套的事务和全球的事务,而且需要应用程序服务器 (在某些情况下也部署在应用服务器的应用程序)。

Spring 框架船舶交易管理战略数目为 Platform Transaction Manager:

管理一个 JDBC 连接上的事务处理

对象-关系映射工作单位管理的事务处理

管理通过一些交易与一些用 JTA 事务管理其他资源,如对象数据库

在这种抽象机制框架还提供了两种方法向应用程序添加事务管理:

以编程方式,利用弹簧的 Transaction Template

一般来说,通过使用像 XML 或 Java 5 元数据注释

Spring的数据访问框架 — — 它集成交易管理框架 — — 它是可以建立起一个事务性系统通过配置而无需依赖 JTA 或 EJB。事务性框架还集成了消息传递和缓存引擎。

Bone CP 春/休眠页包含Spring与休眠结合使用一个完整的示例项目。

模型-视图-控制器组织架构 Spring 框架具有它自己的 MVC 框架,不是原计划。Spring开发人员决定写他们自己的 web 框架作为对他们视为流行雅加达 Struts 的 web 框架,以及在其他可用的框架中的缺陷设计不良的反应。尤其是,他们觉得有不足分离演示文稿和请求处理层,与请求处理层和模型。

如 Struts,Spring MVC 是一个基于请求的框架。框架定义了所有的责任,必须由一个现代的请求基于框架处理策略接口。每个接口的目标是要简单和明确,这样就便于Spring MVC 用户编写自己的实现如果他们自己的选择。MVC 为更清洁的前端代码铺平了道路。所有接口紧密都耦合到 Servlet API。这种紧密耦合到 Servlet API 是被一些人作为Spring开发商未能提供基于 web 的应用程序 [引文需要] 的高级抽象。然而,这种耦合确保同时提供一个高度抽象框架,以缓解工作与说 API 的 Servle

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


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

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

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