JSP技术英文简介

上传人:缘*** 文档编号:25856904 上传时间:2021-08-02 格式:DOCX 页数:8 大小:23KB
返回 下载 相关 举报
JSP技术英文简介_第1页
第1页 / 共8页
JSP技术英文简介_第2页
第2页 / 共8页
JSP技术英文简介_第3页
第3页 / 共8页
点击查看更多>>
资源描述
Introduction of JSP TechnologyJavaServer PagesTM (jsp (SUN enterprise application of choice) technology for the creation of display content dynamically generated Web page provides a simple and rapid method. jsp (SUN enterprise application of choice) technology is designed to enable structure-based Web applications more easily and faster, and can these applications with a variety of Web servers, application servers, browsers, and development tools to work together.Here provides a jsp (SUN enterprise application of choice) technology overview, describes the background of its development, as well as the overall objective of this technology. At the same time, a simple example, also describes a JavaTM technology-based key component of the page.Web application development of JavaServer Pages technology WaysIn the development of jsp (SUN enterprise application of choice) specification process, Sun Microsystems (Sun Microsystems Inc.) And many major Web servers, application servers and development tools providers, as well as a variety of experienced development groups to cooperate. The result is found a page for applications and developers to balance the portability and ease of use of development methodologies.Will generate and display the contents of the separationUsing jsp technology, Web page developers can use HTML or xml logo to design and formatting the final page. Jsp logo or the use of bound feet would have to generate dynamic content on the page. The logic-generated content has been packaged in a logo and JavaBeans components and tied up in a small script, all the scripts in the server-side run. If the core logic was encapsulated in the logo and Beans, then other people, such as management and Web page designers, can edit and use jsp pages, without affecting the generation of content.The server side, jsp engine explained jsp logo and small script to generate the requested content (for example, by accessing JavaBeans components, the use of technology JDBCTM access the database, or include file), and the results to HTML (or xml) page of the form sent back to the browser. This helps the author to protect their code, and ensure that any HTML-based Web browser completely availability.Emphasis on reusable componentsJsp page relies on the vast majority of reusable, cross-platform components (JavaBeans or Enterprise JavaBeansTM components) to implement the requirements of applications more complex treatment. Developers to be able to share and exchange components to perform common operations, or make these components more user or client groups to use. Component-based approach to accelerate the overall development process, and make a variety of organizations in their existing skills and to optimize the results of development efforts in the balance.Used to simplify page development logoWeb page developers are not familiar with the scripting language of the programmer. JavaServer Page technology packages a number of functions, which are in use with the jsp-related xml logo in dynamic content generation needs. Jsp logo standards can access and instantiate JavaBeans components, set or retrieve components of property, download Applet, and implementation by other means more difficult to encode and time-consuming function.Through the development of customized logos library, jsp technology can be extended. In future, third-party developers and other personnel for commonly used features to create your own logo library. This allows Web page developers can use familiar tools and the same logo as the implementation of specific functions of components to work.jsp technology easily integrated into a variety of applications architecture, to take advantage of existing tools and techniques, and expanded to be able to support enterprise-class distributed applications. The use of Java technology as part of the family, as well as the Java 2 (Enterprise Architecture) is an integral part of, jsp technology can support the highly complex Web-based applications.Jsp page because of the built-scripting language is based on the Java programming language, and all the jsp pages are compiled to become Java Servlet, jsp page on with all the benefits of Java technology, including robust storage management and security.As part of Java Platform, jsp has a Java programming language, write once, run everywhere characteristics. As more and more suppliers will be added to jsp support their products, you can use your own choice of server and tools, change tools, or the server does not affect the current application.When used with Java 2 Platform, Enterprise Edition (J2EE) and Enterprise JavaBean technology integration, jsp page will provide enterprise-class scalability and performance, which is essential for the deployment of virtual enterprise Web-based applications is essential.jsp instructionsjsp page using jsp direct instruction delivered to the jsp engine. This includes:jsp page directives related to information transmission page, such as buffer and thread information or wrong treatment.Language instructions specified scripting language, as well as all the expansion.Contains instructions (in the above examples have shown) can be used in the page that contains an external document. A good example is the copyright or company information documents documents - in a centralized location to preserve the document and the page contains more than in all jsp page should be easier to update. Of course, being contained in a document may also be another jsp file.Logo library instructions pointed out that the page can call a client logo library.jsp logoWill deal with the overwhelming majority of jsp and jsp related xml based on the completion of the logo. jsp 1.0 contains substantial standard logo, which identifies as a core identity, including:jsp: useBean statement of the identity of a component instance of the use of JavaBeans. If the component instance does not exist, JavaBeans components to instantiate and register the logo.jsp: setProperty this logo set up examples of components of a propertys value.jsp: getProperty this logo to obtain a component instance of the property value, will be translated into a string, and place it implied object out Medium.jsp:includejsp:forwardThe merit of their logo in the application easy to use and share. Grammar based on the logo of the real power comes from the customer identification library development, makes a tool supplier or other personnel can request a specific assignment to create and logo.Script componentsjsp page in the page that contains a small script, called the small script (scriptlets). Small script is a code fragment, in the request processing is executed. Small scripts can be a static page element (as the same as the above example) to create dynamically generated pages.Script in the signs have been described. Signs in this for all the things are described scripting language engine implementation, in our case are the host of the Java Virtual Machine jsp specification support all commonly used script component, including regular expressions and statements.jsp page application modeljsp page from the implementation of js engine, engines installed in the Web server or application using jsp server. jsp engine to accept the client request to the jsp page, and generate jsp pages to the clients response.jsp pages are usually compiled become a Java Servlet. The latter is a standard Java extension in site has more detailed description. Page developers can access all of the Java application environment to take advantage of Java technology, scalability and portability.When the first jsp page is called, if it does not exist, will be compiled into a Java Servlet category, and is stored in the servers memory. This makes the next call to the page have a very quick response.jsp page can be included in a wide variety of application architecture or model. jsp page can be used by different protocols, components and format of the composition of the Commonwealth. The following sections describe some of the possible consequences.A simple applicationIn a simple implementation, the browser directly call jsp page, jsp page itself generate the requested content (may be called directly from the JDBC database access to information). jsp page can call the JDBC or Java BlendTM component to generate the results, and create a standard HTML, as a result sent back to the browser.The model is basically used jsp page (compilers become Java Servlet) instead of the concept of CGI-BIN. This method has the following advantages:Simple and fast programmingPage authors can easily and resources of state, upon request, to generate dynamic contentThis structure in many applications a good job, but should not be extended to a large number of concurrent Web-based customer access scarce corporate resources, since each client must be set up or share a resource that can be used to connect the content. For example, if the jsp page to access the database, may generate much connection to the database, which will affect the database performance.The use of a flexible Java Servlet ApplicationIn another possible configuration, Web-based client may be directly on the Java Servlet requests, Servlet to generate dynamic content, the results tied to a results object and call jsp page. jsp page to access the object from the dynamic content, and the results (such as HTML) sent back to the browser.This method to create more applications can be shared between reusable components and applications can be used as part of a bigger completed. However, in the same deal with databases such as Enterprise Resource Connection, the scalability problem still exists.JavaBean technology using enterprise-class scalability treatmentjsp page can be used as Enterprise JavaBean (EJB) architecture, a middle layer. In this case, jsp pages and the back-end resources through EJB components interact.EJB components on the back-end management of resources to visit, so as a large number of concurrent users with scalable performance. For e-commerce or other applications, EJB management transactions and potential safety. This will simplify the jsp page. The model for the Java 2 Enterprise Edition (J2EE) platform support.jsp page with the xml technology integrationjsp page can be used to generate the xml and the HTML page.For a simple xml generated, developers can include jsp page xml logo and part of the static template. Dynamic xml generation, the use of server-based objects and generate the output xml client identifier.jsp page with the xml tools are not incompatible. Although the Sun in the design specification when jsp page jsp makes even manual for creators is also very easy, jsp specification also provides a mechanism to facilitate the creation of an arbitrary jsp page xml version. In this way, xml tool to be able to create and operate jsp page.By jsp convert logo and components compatible with the xml equivalent, you can use xml-based tools to operate the jsp page. For example, the script can be included in the in, or based on the xml logo and Medium. In fact, after following a few simple jsp page will be converted to xml pages are possible, these steps include:Adding a root element jspComponents and instructions will be converted to xml and other objects of compatibleFor page in other components (usually non-jsp) create a CDATA elementThrough this method compatible with the xml, create HTML page designers still have a rapidly create dynamic Web pages-to-use environment, meanwhile, xml-based tools and services can be integrated with the jsp page and compatible server and jsp to work together.jsp technologys futurejsp technology has been designed as an open, scalable dynamic Web page set up standards. Developers can use jsp page to create a portable Web applications, in different Web and application servers for the different occasions are running, and whatever the occasion itself and the need for the creation of tools.Through cooperation with leaders of the industry, Sun assurance jsp norms are open and can be transplanted. Can use any client and server platforms, in any place to prepare and deploy them. The future, tools, suppliers and other vendors will be provided for the specialized function of the client logo library to expand the platform functionality.jsp specification version 1.0 is the path to the dynamic Web page generated by an open industry standard method of the first step. Version 1.0 through a core logo sets, implicit objects, and to start creating dynamic Web pages constitutes the basic functions required of the method is basic. Already has a number of Web servers, application server and development tool vendors are adding to their products jsp1.0 support, so that the industry already has the initial, immediate support.Will be completed later in 1999 the 1.1 version of the xml through greater support for identification of customers, as well as integration with J2EE and the expansion of this version. And suppliers may choose to extend and expand the specification in jsp basic, necessary function. jsp engine can support a variety of powerful scripting language and object model. In the industry to expand technological capabilities and the use of jsp at the same time, Sun also promised to guarantee jsp platform and server technology to maintain inter-inherent portability.This article comes from the original link WEB Development Network:JSP技术介绍JavaServer PagesTM (jsp(SUN 企业级应用的首选 ) 技术为创建显示动态生成内容的 Web 页面提供了一个简捷而快速的方法。 jsp(SUN 企业级应用的首选 )技术的设计目的是使得构 造基于 Web 的应用程序更加容易和快捷,而这些应用程序能够与各种 Web 服务器,应用服 务器,浏览器和开发工具共同工作。 这里提供了 jsp(SUN 企业级应用的首选 ) 技术的全面概述,描述了其开发背景以及这项技术的总体目标。同时,在一个简单示例中,还描述了一个基于JavaTM 技术的页面的关键组成部分。Web 应用开发的 JavaServer Pages 技术方法在开发 jsp(SUN 企业级应用的首选 )规范的过程中,太阳微系统公司 (Sun Microsystems Inc.)与许许多多主要的Web服务器、应用服务器和开发工具供应商,以及各种各样富有经验的开发团体进行合作。 其结果是找到了一种为应用和页面开发人员平衡了可移植性和易用 性的开发方法。将内容的生成和显示进行分离使用 jsp(SUN 企业级应用的首选 )技术, Web 页面开发人员可以使用 HTML 或者 xml( 标 准化越来越近了)标识来设计和格式化最终页面。使用jsp(SUN 企业级应用的首选 )标识或者小脚本来生成页面上的动态内容 (内容是根据请求来变化的, 例如请求帐户信息或者特定的 一瓶酒的价格)。生成内容的逻辑被封装在标识和JavaBeans组件中,并且捆绑在小脚本中,所有的脚本在服务器端运行。 如果核心逻辑被封装在标识和 Beans 中, 那么其他人, 如 Web 管理人员和页面设计者,能够编辑和使用 jsp(SUN 企业级应用的首选 )页面,而不影响内容 的生成。在服务器端, jsp(SUN 企业级应用的首选)引擎解释jsp(SUN 企业级应用的首选 )标识和小脚本,生成所请求的内容(例如,通过访问JavaBeans组件,使用JDBCTM技术访问数据库,或者包含文件) ,并且将结果以 HTML (或者 xml( 标准化越来越近了 ) )页面的形式 发送回浏览器。这有助于作者保护自己的代码,而又保证任何基于HTML 的 Web 浏览器的完全可用性。强调可重用的组件绝大多数 jsp(SUN 企业级应用的首选)页面依赖于可重用的,跨平台的组件(JavaBeans或者 Enterprise JavaBeansTM 组件)来执行应用程序所要求的更为复杂的处理。开发人员能 够共享和交换执行普通操作的组件,或者使得这些组件为更多的使用者或者客户团体所使 用。 基于组件的方法加速了总体开发过程, 并且使得各种组织在他们现有的技能和优化结果 的开发努力中得到平衡。采用标识简化页面开发Web页面开发人员不会都是熟悉脚本语言的编程人员。JavaServer Page技术封装了许多功能,这些功能是在易用的、与jsp(SUN企业级应用的首选)相关的xml(标准化越来越近了 )标识中进行动态内容生成所需要的。标准的 jsp(SUN 企业级应用的首选)标识能够访问和实例化JavaBeans组件,设置或者检索组件属性,下载 Applet,以及执行用其他方法更难于编 码和耗时的功能。通过开发定制化标识库, jsp(SUN 企业级应用的首选 )技术是可以扩展的。今后,第三方开发人员和其他人员可以为常用功能创建自己的标识库。这使得Web 页面开发人员能够使用熟悉的工具和如同标识一样的执行特定功能的构件来工作。jsp(SUN 企业级应用的首选 )技术很容易整合到多种应用体系结构中,以利用现存的工具和技巧,并且扩展到能够支持企业级的分布式应用。作为采用 Java 技术家族的一部分,以及Java 2(企业版体系结构)的一个组成部分,jsp(SUN 企业级应用的首选 )技术能够支持高度复杂的基于Web 的应用。由于jsp(SUN企业级应用的首选)页面的内置脚本语言是基于Java编程语言的,而且所有的 jsp(SUN 企业级应用的首选 )页面都被编译成为 Java Servlet, jsp(SUN 企业级应用的首 选)页面就具有Java技术的所有好处,包括健壮的存储管理和安全性。作为Java平台的一部分,jsp(SUN企业级应用的首选)拥有Java编程语言“一次编写,各处运行”的特点。随着越来越多的供应商将jsp(SUN 企业级应用的首选 ) 支持添加到他们的产品中, 您可以使用自己所选择的服务器和工具, 更改工具或服务器并不影响当前的应用。当与Java 2平台,企业版(J2EE)和Enterprise JavaBean技术整合时,jsp(SUN企业级应 用的首选)页面将提供企业级的扩展性和性能,这对于在虚拟企业中部署基于Web 的应用是必需的。jsp 指示jsp(SUN 企业级应用的首选)页面使用jsp(SUN 企业级应用的首选 )指示将指令传递到jsp(SUN 企业级应用的首选)引擎。这其中包括:jsp(SUN 企业级应用的首选)页面指示传递页面相关的信息,例如缓冲区和线程信息或者出错处理。语言指示指定脚本语言,以及所有的扩展。包含指示(在上面例子中有显示)可以被用来在页面中包含一个外部的文档。一个好的例子是著作权文档或者公司信息文档在一个集中地点保存该文档并且在页面中包含比在各个 jsp(SUN 企业级应用的首选)页面中更新要容易些。当然,被包含的文件也可能是另一个 jsp(SUN 企业级应用的首选 ) 文件。标识库指示指出页面可以调用的一个客户标识库。jsp 标识绝大多数 jsp(SUN 企业级应用的首选)处理将通过与jsp(SUN 企业级应用的首选)相关的基于xml(标准化越来越近了 )的标识完成。jsp(SUN企业级应用的首选)1.0中包含大量标准 标识,这些标识作为核心标识包括:jsp:useBean 这个标识声明对一个JavaBeans 组件实例的使用。如果该组件的实例不存在,JavaBeans组件将实例化和注册这个标识。jsp:setProperty 这个标识在组件的实例中设置一个属性的值。jsp:getProperty 这个标识获取一个组件的实例的属性值,将其转化为字符串,并且将它 放入隐含对象out 中。jsp:includejsp:forward标识的好处在于它们易于在应用程序间使用和共享。 基于标识的语法的真正威力来自于 客户标识库的开发,使得工具供应商或其他人员能够为特定的要求创建和分派标识。脚本元件jsp 页面可以在页面中包含小的脚本, 称之为小脚本(scriptlets) 。 小脚本是一个代码片段,在请求的处理过程中被执行。小脚本可以和页面中的静态元件组合(正如上面的例子一样)起来创建动态生成的页面。脚本在 标志中被描述。在这对标志中的所有东西都会被脚本描述语言引擎执行,在我们的例子中是主机上的Java虚拟机。jsp 规范支持所有常用的脚本元件,包括表达式和声明。jsp 页面的应用模型jsp 页面由 jsp 引擎执行,引擎安装在Web 服务器或者使用 jsp(SUN 企业级应用的首选 ) 的应用服务器上。 jsp(SUN 企业级应用的首选)引擎接受客户端对jsp(SUN 企业级应用的首选 )页面的请求,并且生成jsp(SUN 企业级应用的首选)页面给客户端的响应。jsp页面通常被编译成为Java Servlet。后者是一个标准的Java扩展,在站点有更详细的描述。页面开发人员能够访问全部的Java应用环境,以利用Java技术的扩展性和可移植性。当 jsp 页面第一次被调用时, 如果它还不存在, 就会被编译成为一个Java Servlet 类, 并且存储在服务器的内存中。这使得在接下来的对该页面的调用有非常快的响应。jsp 页面可以包含在多种不同的应用体系结构或者模型中。 jsp 页面可以用于由不同协议、组件和格式所组成的联合体中。下面的小节描述了一些可能发生的情况。一个简单应用在一个简单实现中,浏览器直接调用 jsp(SUN 企业级应用的首选)页面,jsp(SUN 企业级应用的首选)页面自己生成被请求的内容(可能会调用JDBC 直接从数据库中获取信息) 。jsp(SUN 企业级应用的首选)页面能够调用JDBC 或者 Java BlendTM 组件来生成结果,并且创建标准的 HTML ,作为结果发送回浏览器。这个模型基本上用 jsp(SUN 企业级应用的首选)页面(编译成为Java Servlet )代替了CGI-BIN 概念。这个方法拥有下列优点:简单而快速地编程页面作者可以很容易地根据请求和资源状态生成动态内容这个结构在许多应用上工作良好, 但不能扩展到大量的基于 Web 的并发客户访问稀少的企业资源, 因为每个客户必须建立或者共享一个到可用内容资源的连接。 例如, 如果 jsp(SUN 企业级应用的首选)页面访问数据库,可能生成许多到数据库的连接,这将影响到数据库的性能。使用 Java Servlet 的一个灵活的应用在另一种可能的配置中,基于 Web 的客户机可能直接对 Java Servlet 进行请求, Servlet 生成动态内容,将结果捆绑到一个结果对象中并且调用 jsp(SUN 企业级应用的首选)页面。jsp(SUN 企业级应用的首选 )页面从该对象中访问动态内容,并且将结果(例如 HTML )发 送回浏览器。这个方法创建了更多的可以为应用程序间共享的可重用的组件, 并且可以作为更大的应用的一部分完成。但是,在处理如数据库一样的企业资源的连接时,还是存在扩展性问题。采用企业级 JavaBean 技术的可扩展处理jsp页面也可以作为企业级JavaBean(EJB)体系结构中的一个中间层。在这种情况下,jsp(SUN 企业级应用的首选)页面和后端资源通过EJB 组件进行交互。EJB 组件管理对后端资源的访问, 从而为众多的并发使用者提供可扩展的性能。 对于电 子商务或者其他应用, EJB 管理交易和潜在的安全性。 这将简化 jsp(SUN 企业级应用的首选 ) 页面。这个模型将为Java 2企业版(J2EE)平台所支持。jsp 页面与 xml 技术的集成jsp 页面可以用于生成xml( 标准化越来越近了 )和 HTML 页面。对于简单的 xml 生成, 开发人员可以包含 xml( 标准化越来越近了)标识和jsp 页面的静态模板部分。对于动态xml(标准化越来越近了 )生成,使用基于服务器的对象和生成xml(标准化越来越近了 )输出的客户化标识。jsp 页面与 xml 工具不是不兼容的。尽管Sun 在设计 jsp(SUN 企业级应用的首选)规范时使得 jsp 页面即使手工操作对于创作者而言也是很容易的, jsp(SUN 企业级应用的首选 ) 规范同时也提供了一个机制以便于创建任意jsp 页面的一个xml 版本。通过这种方法, xml工具能够创作和操作jsp 页面。通过将 jsp 标识和元件转换为与xml( 标准化越来越近了)兼容的对等物,可以使用基于xml(标准化越来越近了 )的工具来操作jsp(SUN企业级应用的首选)页面。例如,脚本可以被 包含在之中,或者基于 xml(标准化越来越近了 )标志的 和 中。事实上,经过下面这样简单的几步将 jsp(SUN 企业级应用的首选) 页面转换为xml( 标准化越来越近了)页面是可能的,这些步骤包括:增加一个 jsp 根元件将元件和指示转换为 xml( 标准化越来越近了)兼容的对等物为页面上其他的元件(通常非jsp(SUN 企业级应用的首选)创建CDATA 元件通过这个与xml( 标准化越来越近了)兼容的方法,创建HTML 页面的设计者仍然拥有一个快速创建动态Web 页面的易用环境,同时, 基于 xml( 标准化越来越近了 ) 的工具和服务可以与 jsp(SUN 企业级应用的首选) 页面集成并且和jsp(SUN 企业级应用的首选)兼容的服务器一起工作。jsp 技术的未来jsp(SUN 企业级应用的首选)技术被设计为一个开放的,可扩展的建立动态Web 页面的标准。开发人员可以使用 jsp(SUN 企业级应用的首选)页面来创建可移植的Web 应用,在不同的 Web 和应用服务器上为不同的场合所运行,而不论采用什么适合本身场合和需要的创建工具。通过与业界领袖的合作, Sun 保证 jsp(SUN 企业级应用的首选)规范是开放的和可移植的。可以使用任何客户机和服务器平台, 在任何地方编写和部署它们。 将来,工具供应商和其他厂商将通过为专门的功能提供客户化的标识库而扩展平台的功能。jsp(SUN企业级应用的首选)规范的1.0版本是通向动态 Web页面生成的一个开放的工业标准方法的第一步。1.0版本通过一个核心标识集、隐含对象以及开始创建动态Web页面所需的基本功能构成了该方法的基础。已经有几个Web 服务器,应用服务器和开发工具供应商正在为他们的产品添加jsp(SUN 企业级应用的首选 )1.0 的支持, 这样在业界已经拥有了最初的、立即的支持。在1999晚些时候将完成的1.1版本,通过更多的xml(标准化越来越近了 )支持、客户化标识、以及与J2EE 的集成而扩展这个版本。并且供应商们可能会有选择地扩展和扩充在jsp(SUN 企业级应用的首选)规范中基本的、必需的功能。jsp(SUN 企业级应用的首选)引擎能够强有力地支持多种脚本语言和对象模型。 在业界扩充和使用 jsp(SUN 企业级应用的首选 )技术能力的同时,也向 Sun 承诺将保证jsp(SUN 企业级应用的首选)技术保持平台和服务器间固有的可移植性。8
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 管理文书 > 英语学习


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


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