Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2008, 11:39 PM
Registered User
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default "Automation server can not create object"

Hai,
       Now want to create outlook object in server application. following sample code i am using now.


<html>
    <head>
        <title> Naga Test </title>
        <script language="JavaScript" type="text/JavaScript">
        <!--
           var nameSpace = null;
           var outlookApp = null;
           var apptFolder = null;
           var apptItem = null;

            function AddCalendarAppointment()
            {

            //
            outlookApp = new ActiveXObject("Outlook.Application"); // This Line not Executed ,after it return Object Expected error.
            //
            nameSpace = outlookApp.getNameSpace("MAPI");
            apptFolder = nameSpace.getDefaultFolder(9);
            apptItem = apptFolder.Items.add("IPM.Appointment");
                try
                {
                apptItem.Subject ="SDFSDSFDS";
                apptItem.Body = "sdfsf";
                apptItem.Location = "sdfsfdsdf";
                apptItem.Start = "12:00 PM"+"12-05-2008";
                apptItem.End ="12:30 PM"+"12-05-2008";
                apptItem.Save();
                }
                catch(e)
                {
                alert("Enable your ActiveX controls " +e);
                }
            }
        //-->
        </script>
    </head>
    <body>

    <OBJECT classid="clsid:99B42120-6EC7-11CF-A6C7-00AA00A47DD2" CODEBASE="http://www.microsoft.com/ie/download/activex/ielabel.ocx#version=3D4,70,0,1086"
         id=sprlbl1
         width=50
         height=200
         align=left
         hspace=20
         vspace=0 >
    </OBJECT>

<input type="button" name="submit" value="SubmitBug" onClick="AddCalendarAppointment()" />
</body>
</html>


     This code without server(normal IE) successfully executed. but when i deploy apache tomcat server this same code, error is occur(Automation server can not create object). How to resolve this error.
please response me. thanks
                         Regards
                       N.Nagaraj

nagaraj
 
Old April 29th, 2008, 10:59 PM
jomet
Guest
 
Posts: n/a
Default

try
enabling ie's
Initialize and script ActiveX controls not marked as safe



jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.
 
Old April 30th, 2008, 08:27 AM
Registered User
 
Join Date: Apr 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks Jomet.
After enabling ie's
Initialize and script ActiveX controls not marked as safe
It's Done.
But I want Programatically how to enable. that means when i click a button,do the above process.

nagaraj





Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation Server can't create object anujrathi ASP.NET 2.0 Professional 0 February 20th, 2007 01:43 AM
Word automation is not working in terminal server kalees ASP.NET 1.0 and 1.1 Professional 0 September 20th, 2006 04:03 AM
create a Line object ,Box object in CR at Runtime? thanhnt Pro VB 6 1 May 16th, 2005 06:51 AM
Automation error The object invoked has disconnect vensee Crystal Reports 0 April 11th, 2005 06:12 PM
RegEx Server.Create Object Error ckwizard77 Classic ASP Professional 1 September 2nd, 2004 03:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.