Forum Stats

  • 3,875,097 Users
  • 2,266,805 Discussions
  • 7,912,079 Comments

Discussions

automation server can't create object ActiveXObject jsp

Hi

Below code snippet is completely working fine on IE when it is embedded in an HTML document.

var fso = new ActiveXObject("Scripting.FileSystemObject"); // creating a Scripting FileSystemObject.
var fh = fso.CreateTextFile("data.xml", true); // creating a file handler variable which is pointing to the given file.
fh.WriteLine(str); // Writing str value to file through file handler variable.
fh.Close(); // closing the file handler object.

But when I am embedding the same snippet in a JSP and trying execute on the same IE, it is failing at ""var fso = new ActiveXObject("Scripting.FileSystemObject");"" and throwing a javascript error as "automation server can't create object".

I have gone through google and could not identify what might gone wrong.

if some had come across the same scenario, pls throw some light on this.


Thanks.

Answers

This discussion has been closed.