home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / CallAspIntrinsics.java < prev    next >
Text File  |  1997-10-25  |  834b  |  37 lines

  1. /**
  2.  * CallAspIntrinsics: A Java class that calls ASP objects directly.
  3.  */
  4.  
  5. package IISSample;
  6.  
  7. import com.ms.com.*;
  8. import com.ms.mtx.*;
  9. import com.ms.asp.*;
  10.  
  11.  
  12. public class CallAspIntrinsics
  13. {
  14.     
  15.     public void sayHello()
  16.     {
  17.         IGetContextProperties iConProps;
  18.         Variant vResponse = new Variant();
  19.         IResponse iResponseObject;
  20.         Variant vMsg;
  21.  
  22.         // Get the Object Context
  23.         iConProps = (IGetContextProperties)MTx.GetObjectContext();
  24.  
  25.         // Get the Response object
  26.         vResponse = iConProps.GetProperty("Response");
  27.  
  28.         iResponseObject = (IResponse) vResponse.getDispatch();
  29.  
  30.         // Print HTML message
  31.         vMsg = new Variant("Hello, World! (written from inside the Java component...)");
  32.  
  33.         iResponseObject.Write(vMsg);
  34.     }
  35.  
  36. }
  37.