can i use java classes in asp without copying it to trustlib ? Most of the Web hoster will not allow to copy the class file in trustlib directory ...<br>
Dear rranjan,<br><br>Java class files need to execute inside a Java VM. ASP does not run inside a VM as far as I know. (Can anyone correct me on this if I'm wrong, I would certianly take advantage of that if it could be done.)<br><br>So if my understanding is correct, even if you put the file anywhere you can't use it in ASP code.<br><br>-pete
As long as u are using IIS, the following works.<br><br>ASP supports objects of all types. A special classid can be found from MSDN , microsoft which pertain to including .class files as objects. These are called monikers. Put this classid in the Object Tag.<br><br>Give it an id. Suppose your class, which can be in any path, as long as U register it(THRU REGEDIT or REGEDT32), has a method called doIt(). THen lets say ur object has an id "abc".<br><br>U can call abc.doIt() easily.<br><br>But the pre-requisites are to register the .class file u are using to a particular classid ( which u can set) I think.<br>For more details, refer MSDN.
Dear Palbano and Methegreat,<br> Thanks a lot.<br> Palbano, As Methegreat suggestes we can use java monikers to access the java class. <br> As i know about monikers and correct me if i am wrong , it can call an object ( using getObject(javaath/classfile)). I tried it and it doesn't work not at least with PWS. It works if i copy the class file to trustlib dir even without registering it. It doedn't work without copying it to tustlib, no matter whether it is registered or not.<br>Thanks.<br>Rajiv. <br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.