Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > access java class with moniker

Reply
Thread Tools

access java class with moniker

 
 
dennis
Guest
Posts: n/a
 
      09-16-2003
Hi,
I need to access Java object through an ASP page. I reckon that there
are two ways:
1) If the Java object is registered as a COM then access it through the
ProgID using CreateObject method.
2) Direct access to the java class through java moniker. I am trying to
do this ..but failed to get it working.

I created a class called Javatest and put it in the
Windows/java/TrustLib and also put it in the classpath.

In the ASP code..I did this,
<%
1. Dim strResult
2. set javaObject = GetObject("java:ClassName")
3. strResult = javaObject.SomeFunction()
4. set javaObject = nothing
%>

I keep getting the "No object for moniker" error.

I also tried registering the class with javareg and tried to access.
Still the same error. Any ideas...checks?

thanks,
den

 
Reply With Quote
 
 
 
 
Atrax
Guest
Posts: n/a
 
      09-16-2003
<%
1. Dim strResult
2. set javaObject = GetObject("java:JavaTest")
3. strResult = javaObject.SomeFunction()
4. set javaObject = nothing
%>


why are you calling it with "java:ClassName" when clearly that's not the
name of your class? or is this just a misleading example?

and what about the method name?





________________________________________
Atrax. MVP, IIS
http://rtfm.atrax.co.uk/

newsflash : Atrax.Richedit 1.0 now released.
http://rtfm.atrax.co.uk/infinitemonk...trax.RichEdit/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why a class can't access protected method from another class in thesame package,the method is interited from the ohtner class from differntpackage? junzhang1983@gmail.com Java 3 01-28-2008 02:09 AM
Class A contains class B, class B points to class A Joseph Turian C++ 5 12-30-2005 03:24 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
A parameterized class (i.e. template class / class template) is not a class? christopher diggins C++ 16 05-04-2005 12:26 AM
My moniker "Wizard" is being forged by a 10 year old! Wizard Computer Information 7 03-06-2005 07:25 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57