Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Using Sun ONE ASP Built-in Objects


Sun ONE Active Server Pages includes built-in objects that handle many common programming tasks. These objects enable you to avoid much of the overhead associated with complex Web programming. The following table lists and briefly describes the built-in objects included with Sun ONE ASP. Complete reference information can be found in ASP Built-in Objects Reference.

Object
Description
The Application object shares application-level information and control settings for the lifetime of the ASP application, which is generally the entire time that the Web server is running.
The Application object is a good place to store information that must exist for more than one user (such as a page counter). However, because a new instance of this object is not created for each user, errors that might not show up when the code is called once might show up when it is called many times in a row.
The ASPError object reports error information, and can be used to obtain information about an error condition that has occurred in script in an ASP page.
The ASPError object is returned by the Server.GetLastError method. It has no methods but exposes several read-only properties, which provide specific information about the error the object represents.
The Request object is used to get information from the user that is passed along in an HTTP request.
The Response object is used to send information to the user.
The Server object provides high-level access to the ASP Server. Along with the Application object, the Server object provides ASP applications with global data (information that applies to all users of the application).
The Server object gives you programmatic control of the Web server, providing access to HTTP services that you would otherwise need to code for each application. By using Server object properties and methods, you can create objects, execute scripts on other ASP pages, translate virtual path names to physical path names, and perform server-side redirects.
The Session object is used to store information about the current user's session. Variables stored with this object exist as long as the user's session is active, even if more than one application is used.

Sun ONE ASP objects use methods to perform some type of procedure, and properties to store object attributes (such as color, font, or size). Some of the objects also contain collections (bits of information that are accessed in the same way).

For Web applications requiring more powerful programming, Sun ONE ASP uses Java as the primary method for extending the ASP architecture into the enterprise environment. Sun ONE ASP supports JavaBeans and Enterprise JavaBeans (EJB), as well as Common Object Request Broker Architecture (CORBA) objects. Component Object Model (COM) objects can also be used to process data and deliver output, with scripts acting as the "glue" to link COM objects.



ContentsPreviousNextIndex