JSP技术英文简介_第1页
JSP技术英文简介_第2页
JSP技术英文简介_第3页
JSP技术英文简介_第4页
JSP技术英文简介_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

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

文档简介

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:include jsp: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 Machinejsp 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 application In 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:include jsp: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的并发客户访问稀少的企业资源,因为每个客户必须建立或者共享一个到可用内容资源的连接

温馨提示

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

评论

0/150

提交评论