This discussion is archived
1 Reply Latest reply: May 17, 2011 4:55 PM by jschellSomeoneStoleMyAlias RSS

automation server can't create object ActiveXObject jsp

835297 Newbie
Currently Being Moderated
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.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points