小商品销售管理系统毕业设计(论文)内容摘要:

o include a resource that does not change very much (such as a page fragment that represents a header or footer) in a JSP. Use the include directive in the including JSP page, and give the included JSP segment a .jspf extension. You want to include content in a JSP each time it receives a request, rather than when the JSP is converted to a servlet. Use the jsp:include standard action. You want to include a file dynamically in a JSP, based on a value derived from a configuration file. Use the jsp:include standard action. Provide the value in an external properties file or as a configuration parameter in the deployment descriptor. You want to include a fragment of an XML file inside of a JSP document, or include a JSP page in XML syntax. Use the jsp:include standard action for the includes that you want to occur with each request of the JSP. Use the jsp: element if the include action should occur during the translation phase. You want to include a JSP segment from outside the including file39。 s context. Use the c:import The operation principle and the advantages of JSP tags In this section of the operating principle of simple introduction JSP and strengths. For the first time in a JSP documents requested by the engine, JSP Servlet is transformed into a document JSP. This engine is itself a Servlet. The operating process of the JSP shown below: (1) the JSP engine put the JSP files converting a Java source files (Servlet), if you find the files have any grammar mistake JSP, conversion process will interrupt, and to the server and client output error messages. (2) if converted, with the engine JSP javac Java source file piler into a corresponding scaleup files. (3) to create a the Servlet (JSP page), the transformation of the Servlet jspInit () method was executed, jspInit () method in the life cycle of Servlet executed only once. (4) jspService () method invocation to the client requests. For each request, JSP engine to create a new thread for processing the request. If you have multiple clients and request the JSP files, JSP engine will create multiple threads. Each client requests a thread. To execute multithread can greatly reduce the requirement of system resources, improving the concurrency value and response time. But also should notice the multithread programming, due to the limited Servlet always in response to memory, so is very fast. (5) if the file has been modified. The JSP, server will be set according to the document to decide whether to repile, if need to repile, will replace the Servlet pile the memory and continue the process. (6) although the JSP efficiency is high, but at first when the need to convert and pile and some slight delay. In addition, if at any time due to reasons of system resources, JSP engine will in some way of uncertain Servlet will remove from memory. When this happens jspDestroy () method was first call. (7) and then Servlet examples were marked with add garbage collection. But in jspInit () some initialization work, if establish connection with database, or to establish a work connection, from a configuration file take some parameters, such as, in jspDestory () release of the corresponding resources. Based on a Java language has many other techniques JSP page dynamic characteristics, technical have embodied in the following aspects: One simplicity and effectiveness The JSP dynamic web pages with the pilation of the static HTML pages of writing is very similar. Just in the original HTML page add JSP tags, or some of the proprietary scripting (this is not necessary). So, a familiar with HTML page write design personnel may be easily performed JSP page development. And the developers can not only, and write script by JSP tags used exclusively others have written parts to realize dynamic pages. So, an unfamiliar with the web developers scripting language, can use the JSP make beautiful dynamic pages. And this in other dynamic web development is impossible. Tow the independence of the program The JSP are part of the family of the API Java, it has the general characteristics of the crossplatform Java program. In other words, is to have the procedure, namely the independence of the platform, 6 Write bided anywhere! . Three procedures patibility The dynamic content can various JSP form, so it can show for all kinds of customers, namely from using HTML/DHTML browser to use various handheld wireless equipment WML (for example, mobile phones and pdas), personal digital equipment to use XML applications, all can use B2B JSP dynamic pages. Four program reusability In the JSP page can not directly, but embedded scripting dynamic interaction will be cited as a ponent part. So, once such a ponent to write, it can be repeated several procedures, the program of the reusability. Now, a lot of standard JavaBeans library is a good example. JSP 技术简介及特点 JSP( Java Server Pages)技术是由 Sun公司发布的用于开发动态 Web应用的一项技术。 它以其简单易学、跨平台的特性,在众多动态 Web应用程序设计语言中异军突起,在短短几年中已经形成了一套完整的规范,并广泛地应用于电子商务等各个领域中。 在国内, JSP 现在也得到了比较广泛的重视,得到了很 好的发展,越来越多的动态网站开始采用 JSP技术。 下面就对 JSP 及其相关技术进行简单的介绍。 JSP 技术可以以一种简捷而快速的方法生成 Web页面。 使用 JSP技术的 Web页面可以很容易地显示动态内容。 JSP技术的设计目的是使得构造基于 Web的应用程序更加容易和快捷,而这些应用程序能够与各种 Web服务器、应用服务器、浏览器和开发工具共同工作。 JSP 技术不是惟一的动态网页技术,也不是第一个,在 JSP技术出现之前就已经存在几种优秀的动态网页技术,如 CGI、 ASP等。 下面结合这些技术的介绍,讲述动态网页技术的发展和 JSP技术的诞生。 JSP的开发背景及发展历史 在万维网短暂的历史中,万维网已经从一个大部分显示静态信息的网络演化到对股票进行交易和进行购书操作的一个基础设施。 在各种各样的应用程序中,对于可能使用的基 于 Web的客户端,看上去没有任何限制。 基于浏览器客户端的应用程序比传统的基于客户机 /服务器的应用程序有几个好处。 这些好处包括几乎没有限制的客户端访问和极其简化的应用程序部署和管理(要更新一个应用程序,管理人员只需要更改一个基于服务器的程序,而不是成千上万的安装在客户端的应用程序)。 这样,软件工业正迅速地向建造基于浏览器客户端的多层次应用程序迈进。 这些快速增长的精巧的基于 Web 的应用程序要求开发技术上的改进。 静态 HTML 对于显示相对静态的内容是不错的选择;新的挑战在于创建交互的基于 Web的应用程序,在这些 程序中,页面的内容是基于用户的请求或者系统的状态,而不是预先定义的文字。 对于这个问题的一个早期解决方案是使用 CGIBIN接口。 开发人员编写与接口相关的单独的程序,以及基于 Web的应用程序,后者通过 Web服务器来调用前者。 这个方案有着严重的扩展性问题 —— 每个新的CGI 要求在服务器上新增。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。