Java Classes

When you install IIS version 4.0 or later, IIS creates a set of Java class files that define the ASP built-in objects. The classes use native Java types, and support native Java interfaces. You can refer to these classes directly, however, the Microsoft Windows Foundation Classes (MWFC) simplify creating Active Server Components. The MWFC creates new interfaces that expose the ASP object model. The goal is to retain all of the features and flavor of the ASP Programming model, but to expose it in a way that is more natural for the Java programmer.

For more information, see Implementing with Visual J++.

ASP provides the ObjectContext object that contains methods that return interfaces to the built-in objects. Your component can then use these object interfaces to access the methods and properties of the built-in objects. The reference pages for the Java version of the built-in objects list the method names. For details on the methods, see the C++ equivalent reference pages.

Interface Description
IApplicationObject Calls the methods and properties of the Application object.
IASPError Returned by the IServer::GetLastError method. Describes an ASP error condition.
IObjectContext Returns an interface to one of the built-in objects: IApplicationObject, IRequest, IResponse, IServer, or ISessionObject.

For more information on the IObjectContext interface, see the COM section.

IReadCookie Retrieves the values and attributes of a cookie stored in the read-only Cookies collection.
IRequest Calls the methods and properties of the Request object.
IRequestDictionary Indexes the subcollections of the IRequest interface. Also retrieves the individual values stored in the ClientCertificate collection.
IResponse Calls the methods and properties of the Response object.
IScriptingContext (Obsolete) Provided as support for legacy ASP applications that use the IScriptingContext to access the built-in objects.
IServer Calls the methods and properties of the Server object.
ISessionObject Calls the methods and properties of the Session object.
IStringList Retrieves the values stored in a string list such as that in the QueryString, Form, or ServerVariables collections.
IVariantDictionary Provides an index of the Application and Session collections.
IWriteCookie Sets the values and attributes of a cookie stored in the write-only Cookies collection.

To use the built-in object interfaces in a Java component, you must import the ASP classes into your code as shown below.

import com.ms.asp.*;
 

For more information about the built-in objects, see the Built-in Objects Reference.