We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 24,806 times

Contents

Related Categories

Using Components and Objects in ASP - Creating objects from a java class

talal

Creating objects from a java class

To use Server.CreateObject to create an instance of a Java class, you must use the JavaReg program to register the class as a COM component. You can then use Server.CreateObject method or an HTML <OBJECT> tag with the PROGID or CLSID. Alternatively, you can use the mechanism provided by Java monikers to instantiate the Java class directly without using the JavaReg program. To instantiate a class with monikers, use the VBScript or JScript GetObject statement and provide the full name of the Java class in the form java:classname. The following VBScript example creates an instance of the Java Date class.

<%
Dim dtmDate
Set dtmDate = GetObject("java:java.util.Date")

Response.Write "The date is " & dtmDate.toString()
%>

Objects created by calling GetObject instead of Server.CreateObject can also access the ASP built-in objects and participate in a transaction. To use Java monikers, however, you must be using version 2.0, or later, of the Microsoft virtual machine.

I LOVE TO TAKE PART IN SOME THING PRODUCTIVE

Comments

  • ASP components

    Posted by preetha on 22 Feb 2004

    In an interview, they asked me what are the components of ASP and VB. Can any body help me?.

  • how to find components on the server

    Posted by ___Kevin___ on 17 Jul 2002

    If you want to try using components, start using those allready installed on your server. Use this script to check your IIS for installed components:
    http://www.bier-voting.de/objcheck/