Server-side processing in dynamic pages

Source: Internet
Author: User
Tags error handling html page
The previous chapters have studied some of the ASP's built-in objects. The main objects are request, Response, session and Application object. Another major object in ASP is the server object. This chapter focuses on the background knowledge and usage of this object.
The server object provides a way to extend the functionality of an ASP page by using instances and other external objects and components in servers-side scripts. In fact, many people think this object is the main factor that makes the ASP popular. The introduction of server objects is significant, which means that ASPs do not have to provide all the attributes that people need. It can invoke other applications and components to complete the specified work.
This fits well with the overall goal of building an application composed of independent objects, rather than building the "everything Can be done" program that is commonly seen as exhausting hard disk space. Not only in the computer world, the whole world is moving toward components and "Plug and Play" concepts. Now, when a car or a television set fails, a technician or engineer may well pull out faulty parts and insert a new one, so the work of the car maintenance staff or the maintenance staff of the TV set becomes object-oriented.
However, IIS also supports many traditional methods of using external objects and interacting with the server environment. This is a specific exception, and these methods are not really ASP components, but are often useful and are well integrated with the ASP through some of the new features of the server object. This chapter briefly reviews these traditional methods and then introduces the ASP server objects in detail.
The main contents of this chapter are:
· Background knowledge and usage of traditional server-side include (SSI) directives.
· The task that the server object is to complete, and the comparison with SSI.
· How to use Server object instances, external components, and applications.
· How to use the server object to execute encapsulated scripts or other ASP pages.
· How to use the server object to manage errors that occur in a script.
· How to use the server object to complete a format conversion with HTML or HTTP compatibility.
The server object is part of the error handling process in an ASP page and is new in IIS 5.0 and ASP 3.0. This chapter describes how the object works. Because there is a separate chapter (chapter 7th) devoted to all issues related to debugging and error handling. So this chapter simply discusses the error handling method and is limited to the processes directly involved in the server object.
4.1 Server-side processing in dynamic pages
As far as server-side processing is concerned, ASP is a relatively new technique for generating dynamic web pages. What does a dynamic page mean? The progress of client-related functionality is not considered for the moment, nor is it discussed with client script, Java applets, Dynamic HTML, or ActiveX controls. The dynamic page here is specifically the page that the server responds to the client request, and the pages generated each time may be different depending on the situation.
To give a simple example, create a page that contains only the current date and time. Each time the page is requested, a different value is displayed because the date and time depend on the server's clock, or on a resource that provides the date and time (for example, a stand-alone server or a standard clock from the Internet). Of course, dynamic pages are actually much more complicated than this, perhaps displaying the current value of the database record or a summary of the mail messages waiting on the mail server. It is important that the server not only read an unformatted HTML page, or text files on a disk, but also send them to customers, and you must do some work to create the page.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.