关于jsp的介绍生外文翻译学士学位论文.doc

上传人:知****量 文档编号:91717058 上传时间:2023-05-27 格式:DOC 页数:12 大小:63.50KB
返回 下载 相关 举报
关于jsp的介绍生外文翻译学士学位论文.doc_第1页
第1页 / 共12页
关于jsp的介绍生外文翻译学士学位论文.doc_第2页
第2页 / 共12页
点击查看更多>>
资源描述

《关于jsp的介绍生外文翻译学士学位论文.doc》由会员分享,可在线阅读,更多相关《关于jsp的介绍生外文翻译学士学位论文.doc(12页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、 xx 理 工 大 学 xx 学 院毕业设计(论文)外文资料翻译系: 计算机系 专 业: 计算机科学与技术 姓 名: xxx 学 号: 080601165 (用外文写)外文出处:Anon .The Introduction Of JSP EB/OL. (2009-01-13)2011-12-20.http:/nibiye. com/fy/wwfy/jsjw/2009/0113/1033.html. 附 件: 1.外文资料翻译译文;2.外文原文。 指导教师评语:该译文比较通顺,专业词汇的使用也比较准确,较好地反映了原文的本意,说明该生较好地理解了原文的意思,表明该同学具备一定的阅读外文资料的能力

2、。 签名: 年 月 日注:请将该封面与附件装订成册。附件1:外文资料翻译译文关于JSP的介绍Java2企业版(J2EE)已经把建立一个网上的乱中有律任务的存在现象进行了有效的改造,就是开发人员能使用Java有效创造多层次的服务器端应用程序。今天,Java企业应用程序编程接口已经扩大,包括许多方面:远程方法调用与公共对象请求代理体系结构用来远程对象的处理,JDBC(Java数据库的连接)的数据库交互,JNDI(Java命名和目录接口)来访问命名和目录服务,为企业创造了可重复使用的JavaBeans业务组件、JMS(Java信息服务)消息中介软件,JAXP为XML(可扩展标示语言)处理和JTA(J

3、ava事务应用程序界面)为执行一个原子事务。此外,J2EE也支持小型服务程序,极受欢迎的Java语言代替了公共网关接口脚本。这些技术的结合,可以让程序员创造分布式业务解决方案中的各种任务。早在在1999年末,Sun Microsystems(美国一家计算机公司)添加了一个新的精选的元素企业Java工具:Java动态服务器页面(JSP)。Java动态服务器页面都是建立在Java的顶部小型服务器用来增进效率使程序员,甚至是非专业的程序员,都可以创建网页的内容。那么什么是Java服务器页呢?我们来简洁明点,Java的动态服务器页面是一个运用科学技术发展的网页,其中是包括动态内容的。不像一个HTML页

4、面,只包含静态内容,总是保持不变的,一个JSP页面中可以改变它的内容基于任何数量的变项,包括用户的身份,用户的浏览器类型,用户信息的提供,或者由用户选择信息等等。一个JSP页面中包含标准标记语言的元素,例如HTML标签,它也就像是一个正规的网页。然而,一个JSP动态服务器页面中也含有特殊的JSP元素允许服务器插入动态的内容在其页面里。JSP元素可以被用于各种用途,比如检索数据库里的信息或注册用户信息等等。当一个用户访问一个JSP动态服务器页面的时候,服务器执行JSP元素,就会融合静态部分的页面来组成动态页面,并将动态组成页面返回到浏览器,供用户浏览。JSP定义了大量的标准构件,适用于任何的网路

5、式应用程序,比如访问JavaBeans组件,通过控制页和信息共享之间,通过在请求,页面和用户之间。程序员可以也将通过实施特定的应用JSP动态服务器页语法元素来完成任务,比如访问数据库执行任务和访问企业JavaBeans组件,比如发送电子邮件和生成HTML到当前的特殊应用程序的细节数据。这样一套通常需要定制的元素被定义为一个质量指标有联系的JSP规范:JSP标准标签库(JSTL)的规格。结合标准元件和自定义元素允许为建立强大的网络应用程序而提供了强有力的保证。那么我们为什么要使用JSP呢?在很早期的网络开发的时候,公共网关接口(CGI)是动态发展的网页内容的唯一的工具。然而, 公共网关接口这并不

6、是一个非常有效的解决方案。为了满足所有开发者的要求,当网络服务器必须创建一个新的操作系统的过程中,负荷翻译和一个脚本的时候,执行了剧本,然后把它们都记录下来了。这对服务器来说是非常繁重繁琐的, 增加了很多不必要的操作和流量。后来众多的公共网关接口被代替和改进了,如快速公共网关接口协议,Apache服务器中的mod_perl模块,从NSAPI到美国网景公司,从ISAPI到美国微软公司,从Java小型服务程序到Sun Microsystems公司,这些都在过去的几年里已经形成了。虽然这些解决方案应对措施展现了很好的表现性和可扩展性,但是所有这些技术遭受了一个共同的问题:他们都是直接产生嵌入HTML

7、网页的程序设计语言代码。因为这一原因就需要创造动态网页领域的专门的程序员了。然而Java服务器页 ,就改变了这一切的一切。JSP拦截问题从另一个方向表明,不是嵌入HTML程序代码,JSP而是让你特别有效成分嵌入HTML网页,这些给HTML元素元素看起来很相似很相似,但当用户请求页面服务器执行时,他们实际上它们都是在幕后构件化Java程式来执行的。这里有一个非常简单的JSP页面,就说明了这一点的内容:c:when test=$clock.hours Good morning! c: when test=$clock.hours Good day! Good evening! Welcome to

8、 our site, open 24 hours a day.这一页根据一天的时间插入一个不同的消息给用户:如果当地时间是12点之前,则给出“早上好!”,如果在12点和6点给出“美好的一天!”,否则就给出“晚上好!”。当一个用户访问这一页,JSP自动化网络服务器用有效的JSP原理执行逻辑回应,且生成一个页面送回用户的浏览器。例如,如果现在的时间是下午8:53,从服务器发送到浏览器的最终页面看起来像这样:Good evening! Welcome to our site, open 24 hours a day. 除了很像超文本标记语言的JSP元素,一个JSP页面中也含有Java代码嵌在所谓的脚

9、本的元素。这一特点已经是最早版本JSP规范的一种了,它用来起来非常方便非常简单而且很有条件逻辑性。通过引入新的JSP标准标签库(JSTL),所以就使得Java代码页是完全没必要的。此外,太多的代码嵌入网页中并不比使用超文本标记语言元素在一个服务器端程序好多少,而且通常会导致有一个网络应用程序请求,这是很难维护和调试的。使用合适的人做每一项合适的任务。当我们早些时候,JSP是允许你把标记语言代码,如HTML,用程序语言代码来处理用户输入,访问数据库和执行其他应用的任务操作。这种分离发生的一种方法是通过使用JSP标准和自定义元素,这些元素是实现和应用程序代码一样标是记元素在常规页网页中的。另一种方

10、法来分离是结合JSP和其他J2EE技术。例如,Java小服务程序可以处理输入后处理,企业JavaBeans(EJB)能够照顾应用的程序的逻辑,和JSP页面可以提供用户界面。这种JSP方法的分离意味着,典型的企业可以分为两组人,他们其中有自己的领域的专业知识的Java程序员可以一起作为开发团队,开发网站实施应用逻辑作为小服务程序,商业应用组件技术和自定义JSP元素,这就使网页具体的工艺的作者使用功能强大的自定义界面元素而就不需要做任何编程。最后整合与企业Java的编程接口,因为都是建立在Java服务器网页上方的Java应用程序界面,JSP拥有所有的强大的企业Java的应用程序接口,这些都包括:

11、JDBC(Java数据库的连接) Remote Method Invocation (RMI) and OMG CORBA support(远程方法调用) JNDI (Java Naming and Directory Interface)(命名目录服务) Enterprise JavaBeans (EJB)(JAVA中的商业应用组件技术) JMS (Java Message Service)(Java消息服务) JTA (Java Transaction API)(事物处理构架) JAXP (Java API for XML Processing)(用于XML文档处理的使用Java语言编写的

12、编程接口) JavaMail(提供给开发者处理电子邮件相关的编程接口)这意味着你可以更加容易地集成Java服务器页面与你现有的Java的企业所需要的解决方案。Java servlet模板引擎。一个Java小型服务程序模板引擎就是另一种技术表现了,从加工到分离。当小型服务程序流行起来,没过多久开发商意识到这是多么难以维护的啊,HTML代码演示部分直接嵌入Java小服务程序的代码。结果就导致了,相当多的所谓的模板引擎已经发展开源产品的帮助获取小服务程序中HTML的值。使用模板引擎的目的是,可以使用纯代码元件(servlets)和使用的网页脚本代码,这仅仅是表现了部分内容。请求被送到一个servle

13、t加工的要求,创造物体,展现了结果,并呼吁一个网页生成的HTML模板将被派到浏览器。包含脚本代码模板描述相似的选择更早。脚本语言使用的这些引擎都缺少一点点的强大,然而,由于脚本只限于读数据对象和生成HTML代码显示其存在的价值。所有其他产品和技术支持的通用语言(这可以是好的也可以是坏的)被用于包括在业务逻辑页面中。结合了最重要的特征中发现的办法:JSP既支持脚本语言也支持基于动态元素的内容,并允许程序员开发自己定义的标签库以用来满足特定应用的需要。JSP页面可以进行非常有效的服务器处理和编译。JSP页面可通过Java servlet支持模板引擎以来用于处理servlets结合商业逻辑的模型。此

14、外JSP还有有几个非常独特的优点,这就使它得以脱颖而出了。JSP是一个质量指标,而不是一个产品。这意味着供应商可以根据不同的要求来实现不同的方案,从而引导他们走向更好的性能和更好的质量。它也会导致一个较不明显的优势,就是即当许多公司已经投入了大量的时间和金钱在技术上,非常可能的是这将会在很长一段时间内,以合理的保证的新版本将会和一个专有的技术反向兼容;这并不是一个总是考虑到了的问题。JSP不可分割的一部分就是J2EE, 它为企业级应用提供了一个非常完整的平台。这意味着JSP能在其中可以扮演一个最简单的应用程序角色,也可以扮演最复杂最 苛刻角色。附件2:外文原文(复印件)The Introduc

15、tion Of JSPThe Java 2 Enterprise Edition (J2EE) has taken the once-chaotic task of building an internet presence and transformed it to the point where developers can use Java to efficiently create multitier, server-side applications. Today, the Java Enterprise APIs have expanded to encompass a numbe

16、r of areas: RMI and CORBA for remote object handling, JDBC for database interaction, JNDI for accessing naming and directory services, Enterprise JavaBeans for creating reusable business components, JMS (Java Messaging Service)for message oriented middleware, JAXP for XML processing, and JTA (Java T

17、ransaction API) for performing atomic transactions. In addition, J2EE also supports servlets , an extremely popular Java substitute for CGI scripts. The combination of these technologies allows programmers to create distributed business solutions for a variety of tasks. In late 1999, Sun Microsystem

18、s added a new element to the collection of Enterprise Java tools: Java Server Pages (JSP). Java Server Pages are built on top of Java servlets and are designed to increase the efficiency in which programmers, and even nonprogrammers, can create web content. What Is Java Server Pages? Put succinctly,

19、 Java Server Pages is a technology for developing web pages that include dynamic content. Unlike a plain HTML page, which contains static content that always remains the same, a JSP page can change its content based on any number of variable items, including the identity of the user, the users brows

20、er type, information provided by the user, and selections made by the user. A JSP page contains standard markup language elements, such as HTML tags, just like a regular web page. However, a JSP page also contains special JSP elements that allow the server to insert dynamic content in the page. JSP

21、elements can be used for a variety of purposes, such as retrieving information from a database or registering user preferences. When a user asks for a JSP page, the server executes the JSP elements, merges the results with the static parts of the page, and sends the dynamically composed page back to

22、 the browser. JSP defines a number of standard elements that are useful for any web application, such as accessing JavaBeans components, passing control between pages and sharing information between requests, pages, and users. Programmers can also extend the JSP syntax by implementing application-sp

23、ecific elements that perform tasks such as accessing databases and Enterprise JavaBeans, sending email, and generating HTML to present application-specific data. One such set of commonly needed custom elements is defined by a specification related to the JSP specification: the JSP Standard Tag Libra

24、ry (JSTL) specification. The combination of standard elements and custom elements allows for the creation of powerful web applications. Why Use JSP? In the early days of the Web, the Common Gateway Interface (CGI) was the only tool for developing dynamic web content. However, CGI is not an efficient

25、 solution. For every request that comes in, the web server has to create a new operating-system process, load an interpreter and a script, execute the script, and then tear it all down again. This is very taxing for the server and doesnt scale well when the amount of traffic increases. Numerous CGI

26、alternatives and enhancements, such as FastCGI, mod_perl from Apache, NSAPI from Netscape, ISAPI from Microsoft, and Java servlets from Sun Microsystems, have been created over the years. While these solutions offer better performance and scalability, all these technologies suffer from a common prob

27、lem: they generate web pages by embedding HTML directly in programming language code. This pushes the creation of dynamic web pages exclusively into the realm of programmers. Java Server Pages, however, changes all that. JSP tackles the problem from the other direction. Instead of embedding HTML inp

28、rogramming code, JSP lets you embed special active elements into HTML pages. These elements look similar to HTML elements, but behind the scenes they are actuallycomponentized Java programs that the server executes when a user requests the page. Heres a simple JSP page that illustrates this:c:when t

29、est=$clock.hours Good morning! c: when test=$clock.hours Good day! Good evening! Welcome to our site, open 24 hours a day. This page inserts a different message to the user based on the time of day: Good morning! if the local time is before 12 P.M., Good day! if between 12 P.M. and 6 P.M., and Good

30、evening! otherwise. When a user asks for this page, the JSP-enabled web server executes the logic represented by the highlighted JSP elements and creates an HTML page that is sent back to the users browser. For example, if the current time is 8:53 P.M., the resulting page sent from the server to the

31、 browser looks like this:Good evening! Welcome to our site, open 24 hours a day. In addition to the HTML-like JSP elements, a JSP page can also contain Java code embedded in so-called scripting elements. This feature has been part of the JSP specification from the very first version, and it used to

32、be convenient for simple conditional logic. With the introduction of the new JSP Standard Tag Library (JSTL), however, Java code in a page is rarely needed. In addition, embedding too much code in a web page is no better than using HTML elements in a server-side program, and often leads to a web app

33、lication that is hard to maintain and debug. Using the Right Person for Each TaskAs I alluded to earlier, JSP allows you to separate the markup language code, such as HTML, from the programming language code used to process user input, access a databases and perform other application tasks. One way

34、this separation takes place is through the use of the JSP standard and custom elements; these elements are implemented with programming code and used the same way as page markup elements in regular web pages. Another way to separate is to combine JSP with other J2EE technologies. For example, Java s

35、ervlets can handle input processing, Enterprise JavaBeans (EJB) can take care of the application logic, and JSP pages can provide the user interface.This separation means that with JSP, a typical business can divide its efforts among two groups that excel in their own areas of expertise: a Java web

36、development team with programmers who implement the application logic as servlets, EJB and custom JSP elements, and page authors who craft the specifics of the interface and use the powerful custom elements without having to do any programming.Integration with Enterprise Java APIs Finally, because J

37、ava Server Pages are built on top of the Java Servlets API, JSP has access to all the powerful Enterprise Java APIs, including: JDBC Remote Method Invocation (RMI) and OMG CORBA support JNDI (Java Naming and Directory Interface) Enterprise JavaBeans (EJB) JMS (Java Message Service) JTA (Java Transac

38、tion API) JAXP (Java API for XML Processing) JavaMail This means that you can easily integrate Java Server Pages with your existing Java Enterprise solutions. Java servlet template engines .A Java servlet template engine is another technology for separating presentation from processing. When servlet

39、s became popular,it didnt take long before developers realized how hard it was to maintain the presentation part when the HTML code was embedded directly in the servlets Java code. As a result,a number of so-called template engines have been developed as open source products to help get HTML out of

40、the servlets. Template engines are intended to be used with pure code components (servlets) and to use web pages with scripting code only for the presentation part. Requests are sent to a servlet that processes the request, creates objects that represent the result, and calls on a web page template

41、to generate the HTML to be sent to the browser. The template contains scripting code similar to the alternatives described earlier. The scripting languages used by these engines are less powerful, however, since scripting is intended only for reading data objects and generating HTML code to display

42、their values. All the other products and technologies support general-purpose languages, which can (for better or for worse) be used to include business logic in the pages. combines the most important features found in the alternatives: JSP supports both scripting- and element-based dynamic content

43、and allowsprogrammers to develop custom tag libraries to satisfy application-specific needs. JSP pages are compiled for efficient server processing. JSP pages can be used in combination with servlets that handle the business logic, the model supported by Java servlet template engines. In addition, J

44、SP has a couple of unique advantages that make it stand out from the crowd: JSP is a specification, not a product. This means vendors can compete with different implementations, leading to better performance and quality. It also leads to a less obvious advantage, namely that when so many companies h

45、ave invested time and money in the technology, chances are it will be around for a long time, with reasonable assurances that new versions will be backward-compatible; with a proprietary technology, this is not always a given. JSP is an integral part of J2EE, a complete platform for enterprise class applications. This means that JSP can play a part in the simplest applications to the most complex and demanding.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com