ASP Java Component Framework
The Microsoft Active Server Pages (ASP) Java Component Framework simplifies the creation of Active Server components by adding new interfaces. The goal is to retain all of the features and flavor of the ASP programming model, but to present that model in a format that is more familiar to Java programmers. The classes use native Java types, and support native Java interfaces. For example, the Application and Session objects, which allow the programmer to store data and associate it with a name, extend the class java.util.Dictionary, the standard Java associative collection class.
Reference Pages
For detailed information about each of the Java Component Framework classes, see the reference pages listed below.
Request | Server | ObjectDictionary |
Response | AspContext | RequestDictionary |
Session | CookieDictionary | Map |
Application | Cookie | Enumerator |
Using the Java Component Framework Classes
The framework has been provided in both source code (.java) and compiled byte code (.class) formats. In order to use the classes, though, you'll have to put them in a place where the Java VM can find them. Do this by performing the following steps:
Using the Samples
The Additional Samples directory contains sample .java (and .class) files that are based on the framework classes, as well as .asp files that use them. See the readme.txt file in the samples directory for information on how to install these on your system.
First, a little terminology. Building a component in Java means creating a single Java class that you will instantiate from ASP as a COM object. This class is called the component class. It is entirely possible that the component will create other Java objects or COM objects, which it uses internally. So, while the source code for your component might consist of multiple Java source files, there will be a single Java class that represents your component.
Creating components with the Java Component Framework is easy; you can create a component by following these steps:
javareg /register /class:[<packagename>.]<classname> /progid:<progid>
For more information on registering a Java component, enter "javareg/?" at the C: prompt.