Jsp技术介绍外文翻译_第1页
Jsp技术介绍外文翻译_第2页
Jsp技术介绍外文翻译_第3页
Jsp技术介绍外文翻译_第4页
Jsp技术介绍外文翻译_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附录A中文译文Jsp技术介绍JSP(JAVASERVERPAGES)是由SunMicrosystems公司倡导、许多公司参与一起建立的一种动态网页技术标准,其在动态网页的建设中有其强大而特别的功能,他主要用于创建可支持跨平台及跨Web服务器的动态网页。JSP可与微软的ActiveServerPages(ASP)相媲美,但JSP使用的是类似于HTML的标记和Java代码片段而不是用VBScript。当你使用不提供ASP本地支持的Web服务器(例如Apache或Netscape服务器)时,你就可以考虑使用JSP了。JavaServerPages技术可以让web开发人员和设计人员非常容易的创建和维护动态网页,特别是目前的商业系统。作为JavaTM技术的一部分,JSP能够快速开发出基于web独立平台的应用程序。JSP把用户界面从系统内容中分离开来,使得设计人员能够在不改变底层动态内容的前提下改变整个网页布局。那么什么是JavaServerPage呢?简单的说,一个JSP网页就是在HTML网页中包含了能够生成动态内容的可执行应用程序代码。此应用程序可能包含JavaBeanTM,JDBCTM对象,EnterpriseJavaBeanTM(EJB)和RemoteMethodInvocation(RMI)对象,所有的部分都可以非常容易的从JSP网页上访问到。例如,一个JSP网页可以包含HTML代码所显示的静态文本和图像,也可以调用一个JDBC对象来访问数据库;当网页显示到用户界面上以后,它将包含静态HTML内容和从数据库中找到相应的动态信息。在JSP网页中,要把用户界面和应用程序分开可以考虑在网页设计人员和开发人员之间执行一个非常方便的授权任务。它也允许开发人员去建立灵活的代码,从而非常容易的进行更新和重复利用。由于JSP网页能够根据需要自动进行编译,web设计人员无须重新编译应用程序逻辑就可以改变表述代码。这也使得JSP与Javaservlet(它是JavaSeverPages功能的扩展)相比成为一种可以更灵活生成动态web内容的方法。在Sun正式发布JSP(JavaServerPages)之后,这种新的Web应用开发技术很快引起了人们的关注。JSP为创建高度动态的Web应用提供了一个独特的开发环境。按照Sun的说法,JSP能够适应市场上包括ApacheWebServer、IIS4.0在内的85%的服务器产品。即使您对ASP或PHP、CGI一往情深,我们认为,关注JSP的发展仍旧很有必要,这是基于以下的比较分析。JSP与Microsoft的ASP、PHP技术非常相似。ASP的编程语言是VBScript之类的脚本语言,JSP使用的是Java,这是他们最明显的区别。此外,ASP、PHP与JSP还有一个更为本质的区别:两种语言引擎用完全不同的方式处理页面中嵌入的程序代码。在ASP下,VBScript代码被ASP引擎解释执行;在JSP下,代码被编译成Servlet并由Java虚拟机执行,这种编译操作仅在对JSP页面的第一次请求时发生。事实证明,JavaServlet是一种开发Web应用的理想构架。JSP以Servlet技术为基础,又在许多方面作了改进。利用跨平台运行的JavaBean组件,JSP为分离处理逻辑与显示样式提供了卓越的解决方案。JSP必将成为其它动态网页技术的有力竞争者。JSP技术特点:1.将内容的生成和显示进行分离使用JSP技术,Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页面。使用JSP标识或者小脚本来生成页面上的动态内容。生成内容的逻辑被封装在标识和JavaBeans组件中,并且捆绑在小脚本中,所有的脚本在服务器端运行。如果核心逻辑被封装在标识和Beans中,那么其他人,如Web管理人员和页面设计者,能够编辑和使用JSP页面,而不影响内容的生成。在服务器端,JSP引擎解释JSP标识和小脚本,生成所请求的内容(例如,通过访问JavaBeans组件,使用JDBCTM技术访问数据库,或者包含文件),并且将结果以HTML(或者XML)页面的形式发送回浏览器。这有助于作者保护自己的代码,而又保证任何基于HTML的Web浏览器的完全可用性。2.强调可重用的组件绝大多数JSP页面依赖于可重用的,跨平台的组件(JavaBeans或者EnterpriseJavaBeansTM组件)来执行应用程序所要求的更为复杂的处理。开发人员能够共享和交换执行普通操作的组件,或者使得这些组件为更多的使用者或者客户团体所使用。基于组件的方法加速了总体开发过程,并且使得各种组织在他们现有的技能和优化结果的开发努力中得到平衡。3.采用标识简化页面开发Web页面开发人员不会都是熟悉脚本语言的编程人员。JavaServerPage技术封装了许多功能,这些功能是在易用的、与JSP相关的XML标识中进行动态内容生成所需要的。标准的JSP标识能够访问和实例化JavaBeans组件,设置或者检索组件属性,下载Applet,以及执行用其他方法更难于编码和耗时的功能。通过开发定制化标识库,JSP技术是可以扩展的。今后,第三方开发人员和其他人员可以为常用功能创建自己的标识库。这使得Web页面开发人员能够使用熟悉的工具和如同标识一样的执行特定功能的构件来工作。JSP技术很容易整合到多种应用体系结构中,以利用现存的工具和技巧,并且扩展到能够支持企业级的分布式应用。作为采用Java技术家族的一部分,以及Java2(企业版体系结构)的一个组成部分,JSP技术能够支持高度复杂的基于Web的应用。由于JSP页面的内置脚本语言是基于Java编程语言的,而且所有的JSP页面都被编译成为JavaServlet,JSP页面就具有Java技术的所有好处,包括健壮的存储管理和安全性。作为Java平台的一部分,JSP拥有Java编程语言一次编写,各处运行的特点。随着越来越多的供应商将JSP支持添加到他们的产品中,您可以使用自己所选择的服务器和工具,更改工具或服务器并不影响当前的应用。附录B英文原文JspTechnologyIntroduceJSP(JAVASERVERPAGES)wasinitiatedbySunMicrosystemsInc.,alongwithanumberofcompaniesinvolvedintheestablishmentofadynamicweboftechnicalstandards,itsdynamicbuildinghasitsstrongandotherspecialfunctions,heusedtosupportthecreationofaninter-Cross-platformWebserveranddynamicpages.JSPwithMicrosoft'sActiveServerPages(ASP)match,buttheuseofJSPissimilartotheHTMLtagsandJavacodefragment,ratherthanusingVBScript.WhenyouuseASPtoprovidesupportforthelocalWebserver(suchasApacheorNetscapeserver),youmaywanttoconsiderusingtheJSP.JavaServerPagestechnologyallowswebdevelopersanddesignersareveryeasytocreateandmaintaindynamicwebpages,especiallythecurrentbusinesssystems.JavaTMtechnologyasapartof,JSPquicklydevelopedbasedontheweb,platform-independentapplications.JSPuserinterfacetothesystemfromthecontenttoleavethemiddlesothatdesignerscannotchangetheunderlyingdynamiccontentonthepremiseoftheentirepagelayoutchanges.SowhatdoesitJavaServerPage?Inshort,aJSPpageisincludedintheHTMLpagestogeneratedynamiccontentoftheapplicationexecutablecode.ThisapplicationmaycontainJavaBeanTM,JDBCTMobject,EnterpriseJavaBeanTM(EJB)andRemoteMethodInvocation(RMI)objects,allcanbepartofaveryeasyfromtheJSPpagetovisit.Forexample,aJSPpagecancontainHTMLcodeshowninstatictextandimagescanalsobeacalltoJDBCaccesstodatabaseobjects;whenthepagedisplaytotheuserinterface,whichwillincludestaticHTMLcontentfromthedatabaseandfindthecorrespondingdynamicInformation.IntheJSPpage,theuserinterfaceisnecessaryandapplicationscanbeconsideredseparatelyfromthewebdesignersanddevelopersaveryconvenientbetweentheimplementationofthemandate.Italsoallowsdeveloperstobuildflexiblecode,whichisveryeasytoupdateandre-use.AstheJSPpageasneededtoautomaticallycompile,webdesignersnoneedtorecompiletheapplicationlogicwillbeabletochangethecodestatements.ThisalsomakesJSPandJavaservlet(itisafunctionoftheexpansionofJavaSeverPages)comparedtoamoreflexibleanddynamicgenerationofwebcontent.SunpublishedintheofficialJSP(JavaServerPages),thisnewWebapplicationdevelopmenttechnologyquicklyattractedattention.JSPtocreateahighlydynamicWebapplicationprovidesauniquedevelopmentenvironment.InaccordancewithSun'sview,JSPbeabletoadapttothemarket,includingtheApacheWebServer,IIS4.0,85%oftheserverproducts.EvenifyourASPorPHP,CGIpassion,webelievethatconcernthedevelopmentofJSPisstillnecessary,whichisbasedonthecomparativeanalysis.JSPandMicrosoft'sASP,PHPisverysimilartothetechnology.ASPisaprogramminglanguagelikeVBScriptscriptinglanguage,JSPusingJava,thisisthemostobviousdifferencebetweenthem.Inaddition,ASP,PHPandJSPhasamoreessentiallydifferent:thetwolanguageswiththeenginecompletelydifferentapproachembeddedinthepagecode.ASPinthenext,VBScriptcodewasexplainedthatimplementationoftheASPengine;intheJSP,thecodewascompiledbytheServletimplementationoftheJavaVirtualMachine,whichoperateonlyinthecompilationofJSPpagesforthefirsttimewhentherequest.

Factshaveprovedthat,JavaServletisaWebapplicationdevelopmentframeworkfortheideal.JSPtoServlettechnology,butalsoinmanywaysbeenimproved.Theuseofcross-platformrunningJavaBeancomponents,JSPfordealingwithseparationoflogicandstyleshowprovidesasuperiorsolution.JSPisboundtobecomeadynamicwebtechnologytootherpowerfulcompetitors.JSPTechnicalCharacteristics:1.ThecontentwillbegeneratedanddisplayedforseparationTheuseofJSPtechnology,WebpagedeveloperscanuseHTMLorXMLformatandlogodesigntothefinalpage.JSPlogoortheuseofboundfeetwouldhavetogeneratedynamiccontentonthepage.ContentgeneratedbythelogicofthelogoandpackagingJavaBeanscomponents,andtiedupinasmallscript,thescriptallrunningontheserverside.IfthecorelogicispackagedintoalogoandBeans,thenothers,suchasmanagersandWebpagedesigners,editorsandbeabletousetheJSPpage,withoutaffectingthecontentofthegeneration.Ontheserverside,JSPengineexplainedJSPscriptlogoandsmall,generatedbythecontentsoftherequest(forexample,byvisitingJavaBeanscomponents,theuseoftechnologyJDBCTMaccessthedatabase,orfilethatcontains),andtheresultswillbeinHTML(orXML)intheformofthepageSentbacktothebrowser.ThiswillhelpauthorstoprotecttheircodewithoutanyguaranteethattheHTML-basedWebbrowser,fullavailability.2.EmphasisonreusablecomponentsThevastmajorityofJSPpagesrelyonreusable,cross-platformcomponents(JavaBeansorEnterpriseJavaBeansTMcomponents)tocarryouttherequiredapplicationismorecomplextodealwith.Developerstoshareandexchangetheimplementationofthegeneraloperationofthecomponents,orcomponentstomakethemmoreuserorcustomergroupsused.Component-basedapproachtoacceleratetheoveralldevelopmentprocessandmakeallkindsoforganizationsintheirexistingskillstodevelopandoptimizetheresultsofeffortstostrikeabalance.3.LogousedtosimplifythedevelopmentofthepageWebpagedevelopersarenotfamiliarwiththescriptinglanguageprogrammers.JavaServerPagetechnologypackageanumberoffunctionsineasy-to-use,XMLandJSPrelatedtotheidentificationofdynamiccontentgenerationneeds.JSPstandardofidentityandaccesstoexamplesofJavaBeanscomponents,orsetuptoretrievecomponentproperties,todownloadApplet,aswellasinotherwaysmoredifficultandtime-consumingcoding.ThroughthedevelopmentofcustomizedIDdatabase,JSPtechnologycanbeextended.Inthefuture,third-partydevelopersandotherscanbeusedtocreatetheirownlogolibrary.ThisWebpagedeveloperscanusefamiliartoolsandthesamelogoastheimplementationofthespec

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论