Home Database Mysql Tutorial 基于JSP的动态网站开发技术_MySQL

基于JSP的动态网站开发技术_MySQL

Jun 01, 2016 pm 02:08 PM
web dynamic based on develop technology server website page

随着Web技术的发展和电子商务时代的到来,人们不再满足于建立各种静态地发布信息的网站,更多的时候需要能与用户进行交互,并能提供后台数据库的管理和控制等服务的动态网站。
动态网站开发技术
早期的动态网站开发技术使用的是CGI-BIN接口。开发人员编写与接口相关的单独的程序和基于Web的应用程序,后者通过Web服务器来调用前者。这种开发技术存在着严重的扩展性问题――每一个新的CGI程序要求在服务器上新增一个进程。如果多个用户并发地访问该程序,这些进程将耗尽该Web服务器所有的可用资源,直至其崩溃。
为克服这一弊端,微软公司提出了Active Server Pages(ASP)技术,该技术利用“插件”和API简化了Web应用程序的开发。ASP与CGI相比,其优点是可以包含HTML标签,可以直接存取数据库及使用无限扩充的ActiveX控件,因此在程序编制上更富有灵活性。但该技术基本上是局限于微软的操作系统平台之上,主要工作环境是微软的IIS应用程序结构,所以ASP技术不能很容易地实现跨平台的Web服务器程序开发。
Hypertext Preprocessor(超文本预处理器),即PHP动态网站开发技术与ASP相似,也是一种嵌入HTML文档的服务器端脚本语言。其语法大部分与C、Java、Perl等语言相似,并形成了自己的独有风格,利用该语言Web程序员可以快速地开发出动态网页。PHP在大多数Unix平台、GUN/Linux和微软Windows平台上均可以运行。PHP的优点主要有:安装方便,学习过程简单;数据库连接方便,兼容性强;扩展性强;可以进行面向对象编程等。但PHP也存在一些弱点,主要是PHP是一种解释型语言,不支持多线程结构,支持平台和连接的数据库都有限,特别是在支持的标准方面存在先天不足,对于某些电子商务应用来说,PHP是不适合的。

还有一些技术,如Java Servlets技术,利用该技术可以很容易地用Java语言编写交互式的服务器端代码。一个Java Servlets就是一个基于Java技术的运行在服务器端的程序(与Applet不同,后者运行在浏览器端)。开发人员编写这样的Java Servlets,以接收来自Web浏览器的HTTP请求,动态地生成响应(可能需要查询数据库来完成这种请求),然后发送包含HTML或XML文档的响应到浏览器。这种技术对于普通的页面设计者来说要轻易地掌握是很困难的。采用这种方法,整个网页必须都在Java Servlets中制作。如果开发人员或者Web管理人员想要调整页面显示,就不得不编辑并重新编译该Java Servlets。
太阳微系统公司(Sun Microsystems Inc.)在Web服务器、应用服务器、交易系统以及开发工具供应商间广泛支持与合作下,整合并平衡了已经存在的对Java编程环境(例如Java Servlets和JavaBeans)进行支持的技术和工具后产生了一种新的、开发基于Web应用程序的方法――JavaServer Pages技术(JSP)。这种动态网站开发技术主要有以下一些特点:
能够在任何Web或应用程序服务器上运行;  
分离了应用程序的逻辑和页面显示;
能够进行快速的开发和测试;
简化了开发基于Web的交互式应用程序的过程。
JSP的技术方法  
为了快速方便地进行动态网站的开发,JSP在以下几个方面做了改进,使其成为快速建立跨平台的动态网站的首选方案。
1.将内容的生成和显示进行分离
用JSP技术,Web页面开发人员可以使用HTML或者XML标识来设计和格式化最终页面,并使用JSP标识或者小脚本来生成页面上的动态内容(内容是根据请求变化的,例如请求账户信息或者特定的一瓶酒的价格等)。生成内容的逻辑被封装在标识和JavaBeans组件中,并且捆绑在脚本中,所有的脚本在服务器端运行。由于核心逻辑被封装在标识和JavaBeans中,所以Web管理人员和页面设计者,能够编辑和使用JSP页面,而不影响内容的生成。
在服务器端,JSP引擎解释JSP标识和脚本,生成所请求的内容(例如,通过访问JavaBeans组件,使用JDBC技术访问数据库或者包含文件),并且将结果以HTML(或者XML)页面的形式发送回浏览器。这既有助于作者保护自己的代码,又能保证任何基于HTML的Web浏览器的完全可用性。
2.可重用组件
绝大多数JSP页面依赖于可重用的、跨平台的组件(JavaBeans或者Enterprise JavaBeans组件)来执行应用程序所要求的复杂的处理。开发人员能够共享和交换执行普通操作的组件,或者使得这些组件为更多的使用者和客户团体所使用。基于组件的方法加速了总体开发过程,并且使得各种组织在他们现有的技能和优化结果的开发努力中得到平衡。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Convert VirtualBox fixed disk to dynamic disk and vice versa Convert VirtualBox fixed disk to dynamic disk and vice versa Mar 25, 2024 am 09:36 AM

When creating a virtual machine, you will be asked to select a disk type, you can select fixed disk or dynamic disk. What if you choose fixed disks and later realize you need dynamic disks, or vice versa? Good! You can convert one to the other. In this post, we will see how to convert VirtualBox fixed disk to dynamic disk and vice versa. A dynamic disk is a virtual hard disk that initially has a small size and grows in size as you store data in the virtual machine. Dynamic disks are very efficient at saving storage space because they only take up as much host storage space as needed. However, as disk capacity expands, your computer's performance may be slightly affected. Fixed disks and dynamic disks are commonly used in virtual machines

Four recommended AI-assisted programming tools Four recommended AI-assisted programming tools Apr 22, 2024 pm 05:34 PM

This AI-assisted programming tool has unearthed a large number of useful AI-assisted programming tools in this stage of rapid AI development. AI-assisted programming tools can improve development efficiency, improve code quality, and reduce bug rates. They are important assistants in the modern software development process. Today Dayao will share with you 4 AI-assisted programming tools (and all support C# language). I hope it will be helpful to everyone. https://github.com/YSGStudyHards/DotNetGuide1.GitHubCopilotGitHubCopilot is an AI coding assistant that helps you write code faster and with less effort, so you can focus more on problem solving and collaboration. Git

How to configure Dnsmasq as a DHCP relay server How to configure Dnsmasq as a DHCP relay server Mar 21, 2024 am 08:50 AM

The role of a DHCP relay is to forward received DHCP packets to another DHCP server on the network, even if the two servers are on different subnets. By using a DHCP relay, you can deploy a centralized DHCP server in the network center and use it to dynamically assign IP addresses to all network subnets/VLANs. Dnsmasq is a commonly used DNS and DHCP protocol server that can be configured as a DHCP relay server to help manage dynamic host configurations in the network. In this article, we will show you how to configure dnsmasq as a DHCP relay server. Content Topics: Network Topology Configuring Static IP Addresses on a DHCP Relay D on a Centralized DHCP Server

DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! DualBEV: significantly surpassing BEVFormer and BEVDet4D, open the book! Mar 21, 2024 pm 05:21 PM

This paper explores the problem of accurately detecting objects from different viewing angles (such as perspective and bird's-eye view) in autonomous driving, especially how to effectively transform features from perspective (PV) to bird's-eye view (BEV) space. Transformation is implemented via the Visual Transformation (VT) module. Existing methods are broadly divided into two strategies: 2D to 3D and 3D to 2D conversion. 2D-to-3D methods improve dense 2D features by predicting depth probabilities, but the inherent uncertainty of depth predictions, especially in distant regions, may introduce inaccuracies. While 3D to 2D methods usually use 3D queries to sample 2D features and learn the attention weights of the correspondence between 3D and 2D features through a Transformer, which increases the computational and deployment time.

Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent Which AI programmer is the best? Explore the potential of Devin, Tongyi Lingma and SWE-agent Apr 07, 2024 am 09:10 AM

On March 3, 2022, less than a month after the birth of the world's first AI programmer Devin, the NLP team of Princeton University developed an open source AI programmer SWE-agent. It leverages the GPT-4 model to automatically resolve issues in GitHub repositories. SWE-agent's performance on the SWE-bench test set is similar to Devin, taking an average of 93 seconds and solving 12.29% of the problems. By interacting with a dedicated terminal, SWE-agent can open and search file contents, use automatic syntax checking, edit specific lines, and write and execute tests. (Note: The above content is a slight adjustment of the original content, but the key information in the original text is retained and does not exceed the specified word limit.) SWE-A

Learn how to develop mobile applications using Go language Learn how to develop mobile applications using Go language Mar 28, 2024 pm 10:00 PM

Go language development mobile application tutorial As the mobile application market continues to boom, more and more developers are beginning to explore how to use Go language to develop mobile applications. As a simple and efficient programming language, Go language has also shown strong potential in mobile application development. This article will introduce in detail how to use Go language to develop mobile applications, and attach specific code examples to help readers get started quickly and start developing their own mobile applications. 1. Preparation Before starting, we need to prepare the development environment and tools. head

How to implement page jump in 3 seconds: PHP Programming Guide How to implement page jump in 3 seconds: PHP Programming Guide Mar 25, 2024 am 10:42 AM

Title: Implementation method of page jump in 3 seconds: PHP Programming Guide In web development, page jump is a common operation. Generally, we use meta tags in HTML or JavaScript methods to jump to pages. However, in some specific cases, we need to perform page jumps on the server side. This article will introduce how to use PHP programming to implement a function that automatically jumps to a specified page within 3 seconds, and will also give specific code examples. The basic principle of page jump using PHP. PHP is a kind of

How to install PHP FFmpeg extension on server? How to install PHP FFmpeg extension on server? Mar 28, 2024 pm 02:39 PM

How to install PHPFFmpeg extension on server? Installing the PHPFFmpeg extension on the server can help us process audio and video files in PHP projects and implement functions such as encoding, decoding, editing, and processing of audio and video files. This article will introduce how to install the PHPFFmpeg extension on the server, as well as specific code examples. First, we need to ensure that PHP and FFmpeg are installed on the server. If FFmpeg is not installed, you can follow the steps below to install FFmpe

See all articles