次の方法で共有


Java Classes for the ASP Built-In Objects

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 access to the ASP built-in objects. 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.

The table below lists the method names for the ASP built-in objects used by Java classes. For details on the methods of each interface, see the method references under Implementing with Visual C++.

Interface

Description

IApplicationObject Java Interface

Provides access to the methods of the Application Object object.

IASPError Java Interface

Returned by the IServer::GetLastError method. Provides access to the read-only properties describing the last error event.

IObjectContext

Returns an interface to one of the ASP built-in objects: IApplicationObject Java Interface, IRequest Java Interface, IResponse Java Interface, IServer Java Interface, or ISessionObject Java Interface. Provides transaction control. For more information about the COM+ ObjectContext object, see Accessing ASP Built-In Objects from Components Reference. For complete information on the IObjectContext interface, see the COM+ Programmer's Reference of the Software Developer Kit (SDK).

IReadCookie Java Interface

Provides access to the values stored in the read-only Request object Request.Cookies Collection collection.

IRequest Java Interface

Provides access to the methods and properties of the Request Object object.

IRequestDictionary Java Interface

Indexes the sub-collections of the IRequest interface. You can also use it to retrieve the individual values stored in the Request.ClientCertificate Collection collection.

IResponse Java Interface

Provides access to the methods and properties of the Response Object object.

IScriptingContext Java Interface (Obsolete)

Returns a pointer to an interface on one of the ASP built-in objects: IApplicationObject Java Interface, IRequest Java Interface, IResponse Java Interface, IServer Java Interface, or ISessionObject Java Interface. This interface is no longer supported. Instead, use the COM+ IObjectContext interface.

IServer Java Interface

Provides access to the methods and properties of the Server Object object.

ISessionObject Java Interface

Provides access to the methods and properties of the Session Object object.

IStringList Java Interface

Provides access to the values stored in a string list, such as that in the Request.QueryString Collection, Request.Form Collection, or Request.ServerVariables Collection collections.

IVariantDictionary Java Interface

Provides access to the items stored in the Application and Session Contents and StaticObjects collections.

IWriteCookie Java Interface

Sets the values and attributes of a cookie stored in the write-only Response object Response.Cookies Collection collection.

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

import com.ms.asp.*; 

Requirements

Client: Requires Windows XP Professional, Windows 2000 Professional, or Windows NT Workstation 4.0.

Server: Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0.

Product: IIS

See Also

Other Resources

COM+ Programmer's Reference