信息发布系统(网上书店)论文.doc

约42页DOC格式手机打开展开

信息发布系统(网上书店)论文,摘 要jsp(javaserver pages, java服务器页面)是一种开发web应用程序的新技术。自从首次发布以来,他一直受到密切的关注。为什么jsp如此激动人心,一个重要的原因是它是基于java的,而java极为适合于干企业级计算。事实上jsp是j2ee平台的关键部分,她能够利用java企业级类库的许多优点,比...
编号:35-206180大小:9.65M
分类: 论文>计算机论文

内容介绍

此文档由会员 wanli1988go 发布

摘 要

JSP(JavaServer Pages, java服务器页面)是一种开发Web应用程序的新技术。自从首次发布以来,他一直受到密切的关注。
为什么JSP如此激动人心,一个重要的原因是它是基于Java的,而Java极为适合于干企业级计算。事实上JSP是J2EE平台的关键部分,她能够利用Java企业级类库的许多优点,比如说JDBC,EJB和JNDI。另一个原因在于JSP支持强大的WEB应用程序开发模式,它能够把外观呈现与处理过程分离开来。要理解为什么这个特性如此的重要,我们需要了解一点WEB的发展历史。在WEB发展的早期,开发动态网页的唯一工具是CGI。CGI描述了WEB服务器如何使某个程序接收用户的输入,以及该程序如何向WEB服务器提供动态生成的内容作为反馈。CGI脚本常用Perl语言来编写(事实上,CGI Perl脚本现在仍在许多动态网站上运行着)。然而,CGI并非一种高效率的解决方案。对于每一个请求,WEB服务器都要创建一个新的操作系统进程,装入一个Perl解释器和Perl脚本,运行该脚本,然后当一切完成后,再释放该进程。
在最近几年里,为了提供更加有效的解决方案,许多CGI的替代品进入了程序员的工具箱,例如,FastCGI,在外部永久进程(或进程池中)运行每一个CGI程序。另外,用于APACHE服务器的mod_perl等,都是在WEB服务器的同一进程中运行服务器端程序的方案。虽然这些解决方案提供了更好的性能和可伸缩性。但他们中的每一种都只能被几种常用的Web服务器所支持。
1997年提出的Java Servlet API提供了一种新的解决办法。然而,所有这些技术都面临着同一个问题:嵌入到程序中的HTML代码。如果你阅读过Servlet代码,你就会发现有数不清的对Out.Println()的调用,这些调用是为了输出HTML的标记。对于一个在简单站点上工作的个人开发者来说,这种方式很合适,但当有几个拥有不同技能的人协同开发WEB应用程序时,这就变得极为艰难了。这个问题已经成为当务之急。当网站变得越来越复杂,并越来越多的依靠良好的协同组织的时候,web界面的美观性和易用性就变成了最重要的东西。
Java服务器页面提供的正是这样一种开发模式。它使得擅长图形制作,布局和可用性的网页设计师与精通服务器端技术(例如多线程,资源池,数据库和高速缓存)的程序员能够协同工作。尽管其他的一些技术也支持类似的开发模式,例如ASP,PHP和ColdFusion,但他们当中没有一个能够提供JSP的所有优点。


Abstract
JavaServer Pages (JSP) is a technology for web application development that has received a great deal of attention since it was first announced in 1999. Since then, it has gone through two revisions.
Why is JSP so exciting? One reason is that JSP is Java-based, and Java is well suited for enterprise computing. In fact, JSP is a key part of the Java 2 Enterprise Edition (J2EE) platform and can take advantage of the many Java Enterprise libraries, such as JDBC ,JNDI , and Enterprise JavaBeans .
Another reason is that JSP supports a powerful model for developing web applications that separates presentation from processing. Understanding why this is so important requires a bit of a history lesson. In the early days of the Web, the only tool for developing dynamic web content was the Common Gateway Interface (CGI). CGI outlined how a web server made user input available to a program, as well as how the program provided the web server with dynamically generated content to send back. CGI scripts were typically written in Perl. (In fact, Perl/CGI scripts still drive numerous dynamic web sites.) However, CGI is not an efficient solution. For every request, the web server has to create a new operating-system process, load a Perl interpreter and the Perl script, execute the script, and then dispose of it when it's done.
To provide a more efficient solution, various alternatives to CGI have been added to programmers' toolboxes over the last few years: FastCGI, for example, runs each CGI program in an external permanent process (or a pool of processes). In addition, mod_perl for Apache, and ISAPI for Microsoft's IIS all run server-side programs in the same process as the web server itself. While these solutions offer better performance and scalability, each one is supported only by a subset of the popular web servers.
The Java Servlet API, introduced in early 1997, provides a solution to the portability issue.However, all these technologies suffer from a common problem: HTML code embedded inside programs. If you've ever looked at the code for a servlet, you've probably seen endless calls to out.println( ) that contain scores of HTML tags. For the individual developer working on a simple web site, this approach may work fine, but it makes it difficult for people with different skills to work together to develop a web application.
This embedded HTML code is becoming a significant problem. As web sites become increasingly complex and more critical to an organization's success, the appearance and usability of the web interface becomes paramount.
JSP provides just such a development model, allowing web-page authors with skills in areas such as client-side technologies and usability, to work in tandem with programmers who are experienced in server-side technologies, such as multithreading, resource pooling, databases, and caching. While there are other technologies, such as ASP, PHP, and ColdFusion, that support similar development models, none offer all the advantages of JSP.


目..