• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling a ActiveX Object from JSP

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to call a ActiveX object from JSP using the ActiveXObject method in javascript. I have a dll filed named Patchgenerator.dll which is registered and assigned a prog id "Patchgenerator.PatchGen.1" which is being passed as an argument to the ActiveXObject method. Below is the code i am trying to execute..

<html>
<head>
<title>Script Example</title>
</head>
<body>
<br><br>
<P align="center">
<form action="" method="post">
<script language="JavaScript">

var SSOObj = new ActiveXObject("Patchgenerator.PatchGen.1");

var Token = SSOObj.Getmethod("","","");

var Token = SSOObj.Setmethod("","","","");
</script>
</form>
</body>
</html>

When i write the above code and save it as an html file it works fine..the activex object is created and the methods are called , but when i copy the same code to a file and save it as jsp file under webapps folder under tomcat it doesnt work and reports a javascript error with the error being:

Automation server cant create the object at line :
var SSOObj = new ActiveXObject("Patchgenerator.PatchGen.1");

Please suggest how can I solve the problem. Your help would be sincerely appreciated.

Thanks
Gautam
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my guess is, the dll, ocx, or whatever isn't available to the browser from the application server.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ActiveX objects run on the client and have no meaning on the server (Irrespective whether its HTML or jsp) My guess is that you mustve run the jsp in a different machine which didnt have the dll or ocx (The activex dll/ocx should be referred to in the registry of the client machine)

I suggest you set the codebase attribute for your activeX control. So the browser will download and install the control if needed (Assuming ActiveX permissions are enabled)
All the best.
 
gautam anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Thanks all of you for your valuable help..thanks for providing me the information and suggestions on time..I sincerely appreciate your help.

Thanks
Gautam
 
reply
    Bookmark Topic Watch Topic
  • New Topic