77范文网 - 专业文章范例文档资料分享平台

在线售票系统设计说明书(8)

来源:网络收集 时间:2019-03-16 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

陕西理工学院毕业设计

参考文献

[1]于松涛.精通SQL server 2000数据库管理与开发[M].北京:人民邮电出版社,2003.10 [2]飞思科技产品开发中心.SQL Server 2000基础与提高[M].北京:电子工业出版社,2001.7 [3]邝孔武.管理信息系统分析与设计[M].西安:西安电子科技大学出版社,1995.12 [4]齐治昌,谭庆平,宁洪.软件工程[M].北京:高等教育出版社,2004.06 [5]汤庸.软件工程方法与管理[M].北京:冶金工业出版社,2002.10 [6]张虹.软件工程与软件开发工具[M].北京:清华大学出版社,2004.09

[7]余伟平.计算机管理信息系统开发与应用[M].成都:电子科技大学出版社,1998.06 [8]杨文龙.软件工程[M].北京:电子工业出版社,2004.10

[9]崔巍. PowerBuilder面向对象开发教程[M].北京:高等教育出版社,2002.12 [10]萨师煊,王珊.数据库系统概论[M].北京:高等教育出版社,2000.05

[11]覃征,何坚,高洪江,李顺东,黄茹.软件工程与管理[M].北京:清华大学出版社,2005.06 [12]薛华成.管理信息系统[M].北京:清华大学出版社,1993.02

[13]岑玲 基于Browser/Server结构的办公自动化系统[M]. 计算机与现代化 2001.2 [14]丁宝康、董健全 数据库实用教程[M]. 清华大学出版社2003.6

[15]石志国 、薛为民 JSP应用教程[M]. 清华大学出版社;北京交通大学出版社2004.10 [16]胡艳洁 HTML标准教程[M]. 中国青年出版社 2004.9

[17]Robet K.Bete. Software engineering[M]. Beijing:Tsinghua University Press,2004.11

[18] Danny Ryan, Tommy Ryan.ASP.NET New York.NY.Cleveland, OH.Indianapolis, IN 2006. 70-92 [19] John Kauffman. Thiru Thangarathinam ASP. NET 2.0 Database Beta Preview, 2006. 114-160

第 32 页 共 49页

陕西理工学院毕业设计

科技外文文献

Introducing Java Server Pages

The Java 2 Enterprise Edition (J2EE) has taken the once-chaotic task of building an internet presence and transformed it to the point where developers can use Java to efficiently create multitier,server-side applications. Today,the Java Enterprise APIs have expanded to encompass a number of areas: RMI and CORBA for remote object handling, JDBC for database interaction, JNDI for accessing naming and directory services, Enterprise JavaBeans for creating reusable business components, JMS (Java Messaging Service)for message oriented middleware, JAXP for XML processing, and JTA (Java Transaction API) for performing atomic transactions. In addition, J2EE also supports servlets, an extremely popular Java substitute for CGI scripts. The combination of these technologies allows programmers to create distributed business solutions for a variety of tasks.

In late 1999, Sun Microsystems added a new element to the collection of Enterprise Java tools: Java Server Pages (JSP). Java Server Pages are built on top of Java servlets and are designed to increase the efficiency in which programmers, and even nonprogrammers, can create web content. What Is Java Server Pages?

Put succinctly, Java Server Pages is a technology for developing web pages that include dynamic content. Unlike a plain HTML page, which contains static content that always remains the same, a JSP page can change its content based on any number of variable items, including the identity of the user, the user's browser type, information provided by the user, and selections made by the user.

A JSP page contains standard markup language elements, such as HTML tags, just like a regular web page. However, a JSP page also contains special JSP elements that allow the server to insert dynamic content in the page. JSP elements can be used for a variety of purposes, such as retrieving information from a database or registering user preferences. When a user asks for a JSP page, the server executes the JSP elements, merges the results with the static parts of the page, and sends the dynamically composed page back to the browser.

JSP defines a number of standard elements that are useful for any web application, such as accessing JavaBeans components, passing control between pages and sharing information between requests, pages, and users. Programmers can also extend the JSP syntax by implementing application-specific elements that perform tasks such as accessing databases and Enterprise JavaBeans, sending email, and generating HTML to present application-specific data. One such set of commonly needed custom elements is defined by a specification related to the JSP specification: the JSP Standard Tag Library (JSTL) specification. The combination of standard elements and custom elements allows for the creation of powerful web applications. Why Use JSP?

In the early days of the Web, the Common Gateway Interface (CGI) was the only tool for developing dynamic web content. However, CGI is not an efficient solution. For every request that comes in, the web server has to create a new

operating-system process, load an interpreter and a script, execute the script, and then tear it all down again. This is very taxing for the server and doesn't scale well when the amount of traffic increases.

Numerous CGI alternatives and enhancements, such as FastCGI, mod_perl from Apache, NSAPI from Netscape, ISAPI from Microsoft, and Java servlets from Sun Microsystems,

have been created over the years. While these solutions offer better performance and scalability, all these technologies suffer from a common problem: they generate web pages by embedding HTML directly in programming language code. This pushes the creation of dynamic web pages exclusively into the realm of programmers. Java Server Pages, however, changes all that.

JSP tackles the problem from the other direction. Instead of embedding HTML in programming code, JSP lets you embed special active elements into HTML pages. These elements look similar to HTML elements, but behind the scenes they are actually

componentized Java programs that the server executes when a user requests the page. Here's a simple JSP page that illustrates this:

第 33 页 共 49页

陕西理工学院毕业设计

<%@ taglib prefix=\

Good morning!

Good day!

Good evening!

Welcome to our site, open 24 hours a day.

This page inserts a different message to the user based on the time of day: \P.M., \JSP-enabled web server executes the logic represented by the highlighted JSP elements and creates an HTML page that is sent back to the user's browser. For example, if the current time is 8:53 P.M., the resulting page sent from the server to the browser looks like this:

Good evening!

Welcome to our site, open 24 hours a day.

In addition to the HTML-like JSP elements, a JSP page can also contain Java code embedded in so-called scripting elements. This feature has been part of the JSP specification from the very first version, and it used to be convenient for simple conditional logic. With the introduction of the new JSP Standard Tag Library (JSTL), however, Java code in a page is rarely needed. In addition, embedding too much code in a web page is no better than using HTML elements in a server-side program, and often leads to a web application that is hard to maintain and debug. Using the Right Person for Each Task

As I alluded to earlier, JSP allows you to separate the markup language code, such as HTML, from the programming language code used to process user input, access a databases and perform other application tasks. One way this separation takes place is through the use of the JSP standard and custom elements; these elements are implemented with programming code and used the same way as page markup elements in regular web pages.

Another way to separate is to combine JSP with other J2EE technologies. For example, Java servlets can handle input processing, Enterprise JavaBeans (EJB) can take care of the application logic, and JSP pages can provide the user interface. This separation means that with JSP, a typical business can divide its efforts among two groups that excel in their own areas of expertise: a Java web development team with programmers who implement the application logic as servlets, EJB and custom JSP elements, and page authors who craft the specifics of the interface and use the powerful custom elements without having to do any programming. Integration with Enterprise Java APIs

第 34 页 共 49页

陕西理工学院毕业设计

Finally, because Java Server Pages are built on top of the Java Servlets API, JSP has access to all the powerful Enterprise Java APIs, including: ? JDBC

? Remote Method Invocation (RMI) and OMG CORBA support ? JNDI (Java Naming and Directory Interface) ? Enterprise JavaBeans (EJB) ? JMS (Java Message Service) ? JTA (Java Transaction API)

? JAXP (Java API for XML Processing) ? JavaMail

This means that you can easily integrate Java Server Pages with your existing Java Enterprise solutions.

Java servlet template engines

A Java servlet template engine is another technology for separating presentation from processing. When servlets became popular, it didn't take long before developers realized how hard it was to maintain the presentation part when the HTML code was embedded directly in the servlet's Java code. As a result, a number of so-called template engines have been developed as open source products to help get HTML out of the servlets.

Template engines are intended to be used with pure code components (servlets) and to use web pages with scripting code only for the presentation part. Requests are sent to a servlet that processes the request, creates objects that represent the result, and calls on a web page template to generate the HTML to be sent to the browser. The template contains scripting code similar to the alternatives described earlier. The scripting languages used by these engines are less powerful, however, since scripting is intended only for reading data objects and generating HTML code to display their values. All the other products and technologies support general-purpose languages, which can (for better or for worse) be used to include business logic in the pages.

combines the most important features found in the alternatives:

? JSP supports both scripting- and element-based dynamic content and allows programmers to develop custom tag libraries to satisfy application-specific needs. ? JSP pages are compiled for efficient server processing.

? JSP pages can be used in combination with servlets that handle the business logic, the model supported by Java servlet template engines. In addition, JSP has a couple of unique advantages that make it stand out from the crowd:

? JSP is a specification, not a product. This means vendors can compete with different implementations, leading to better performance and quality. It also leads to a less obvious advantage, namely that when so many companies have invested time and money in the technology, chances are it will be around for a long time, with reasonable assurances that new versions will be backward-compatible; with a proprietary technology, this is not always a given.

? JSP is an integral part of J2EE, a complete platform for enterprise class applications. This means that JSP can play a part in the simplest applications to the most complex and demanding.

第 35 页 共 49页

陕西理工学院毕业设计

JSP介绍

J2EE(Java2企业版)已经承担起了曾经很混乱的建立互联网平台的任务,并使开发者们能够使用Java来高效地创建多层服务器端应用程序。现今,Java企业版的API已经扩展为涵盖了众多领域:用于远程对象处理的RMI和CORBA,用于数据库交互的JDBC,用于访问命名和目录服务的JNDI,

TM

用于创建可重用商务组件的企业级JavaBeans(EJB),用于面向消息的中间件的JMS(Java Messaging

TMTM

Service,Java消息服务),用于XML处理的JAXP,以及用于执行原子性(atomic)事务的JTA(Java Transaction API,Java事务API)。另外,J2EE还支持servlets是一种非常流行的用于替代CGI脚本的Java小程序。这些技术的组合使得程序员可以为各种不同的任务创建分布式的商务解决方案。

在1999年末,Sun Microsystems公司向企业级Java工具集中加入了一个新的元素:Java Server Pages(JSP,Java服务器页面)。JSP建立在Java servlet之上,它的设计目的是使程序员乃至非程序员都能高效地创建Web内容。

什么是JSP?

简明扼要地说,JSP是一种用来开发含有动态内容网页的技术。纯HTML页面只包含静态的内容,它的内容通常保持不变,而JSP页面则不同,它可以根据任意数量的变量来改变自己的内容,这些变量包括用户的身份信息,用户使用的浏览器类型,用户提供的信息,以及用户所做的选择等。

JSP页面就和常规的网页一样,包含标准的标记语言元素,例如HTML的标签。然而,JSP页面还包含特殊的JSP元素,这些元素使得服务器可以把动态内容插入到网页中。JSP元素的用途非常广泛,例如从数据库取得信息,或记录用户的个性信息。当用户请求一个JSP页面时,服务器先执行JSP元素,并把结果同网页的静态部分相结合,然后把动态合成后的页面送回到浏览器。

JSP定义了许多用于Web应用程序的有用的标准元素,例如访问JavaBeans组件的元素,在页面间传递控制权的元素,以及在请求,页面和用户间共享信息的元素。程序员也可以通过使用应用程序的专用元素来扩展JSP语法,从而完成像访问数据库和EJB,发送电子邮件,生成表示应用程序专用数据的HTML这样的任务,与JSP规范相关的规范(JSTL规范)定义了一组这种常用的自定义元素。标准元素和自定义元素的组合确保了可以开发出强大的Web应用程序。

为什么要使用JSP?

在Web发展的早期,CGI(Common Gateway Interface,公共网关接口)是开发动态Web内容的唯一工具,然而,CGI并非一种高效率的解决方案。对每一个传来的请求,Web服务器都必须创建一个新的操作系统进程,载入一个解释器和一个脚本,接着执行这个脚本,然后再把这些全部释放掉。这使得服务器承受着繁重的负担,而且当通信量增加时性能会变得很低。

过去几年里 ,出现了许多CGI的替代品和增强版,例如FastCGI,Apache的mod_perl,Netscape的NSAPI,Microsoft的ISPAI和Sun Microsystems的Java servlet。虽然这些解决方案能提供更高的性能和可缩放性,但是所有这些技术都面临着同一个问题:它们都是通过把HTML代码直接嵌入到程序语言代码中来生成网页。这使得动态网页的创建成为程序员所独立的领域。然而,JSP改变了这一切。

在HTML页面中嵌入动态元素: JSP从一个角度来处理这个问题。JSP允许将特殊的活性元素嵌入到HTML页面中,而不是将HTML语言嵌入到编程代码中。这些元素看起来与HTML元素类似,但它们实际上是组件化的Java程序,当用户请求页面时,服务器便会执行该程序。下面这个简单的JSP页面解释了这一点: <% taglib prefix=”c” url=”http://java.sun.com/jstl/core”%>

第 36 页 共 49页

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库在线售票系统设计说明书(8)在线全文阅读。

在线售票系统设计说明书(8).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/528177.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: