This sample is located in \Samples\ASP.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
The ASP Java Component Framework is designed to make it simple to access the built-in ASP objects from a Java component. The framework hides many of the intricacies of COM object programming from you, allowing you to focus almost exclusively on enhancing the functionality of your component. It is still important, however, to have some understanding of what the underlying code does.
This sample demonstrates the steps required to gain access to and invoke a method in the built-in Response object if you were not using the ASP Java Component Framework. The sample uses the Component Services GetObjectContext method to receive a pointer to the interface for the context properties. It then uses the GetProperty method of the context properties to receive a reference to the actual Response object. The getDispatch method of the Response object is called to receive a pointer to the actual dispinterface for the Response object, IResponse. Finally, the IResponse.Write method is used to send "Hello, World!" to the client browser.
See Using the ASP Samples for instructions on installing, running, and uninstalling this sample.
This class calls ASP objects directly, gets the object context and the response object, and prints the HTML message.
CallASPIntrinsics_test.aspA Java component accessing the ASP context directly without using the framework.