Javascript to Java (Applet) method call fails in JRE1.4.1 & NN4.79

Win2k, Netscape 4.79, JRE 1.4.1. I'm trying to call an applet method from Javascript from the page which contains the applet. 'm using MAYSCRIPT tag. I'm getting the error "myApplet doesn'nt have any properties". (myApplet is the name of the applet). When I use the default JRE which is supported by NN4.79(Symantic JRE 1.1.5) it works well. Does JRE1.4.1 plugin doesn't support Javascript to Java calls? OR I'm doing something wrong.
Deepak

I'm seeing the same issue. This is supposed to work. I converted the <APPLET> tags in the HTML to use <OBJECT> and <EMBED> tags using Sun's converter (see http://java.sun.com/j2se/1.4/docs/guide/plugin/developer_guide/using_tags.html). I try to reference the applet (using the document.embeds[0] object instead of the document.applets[0] object) and it seems the applet has not been loaded. I can't reference any of the methods in the applet. It appears the applet has not loaded. I do not see any evidence of the applet's init() method being called.
Have you had any luck getting this to work?

Similar Messages

  • Re: [Fwd: Java Applet IIOP Call-In with Release 3C--How dowe speed up d

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

    Hi Michael,
    We have done exactly what you describe and have avoided the slow applet
    download times. Although it can be a bit tricky, it is possible to use
    the ORB bundled inside the Netscape 4.0 browser (Visibroker for Java by
    Visigenic). Most of the code should follow Netscape's examples (on
    http://developer.netscape.com)--just remember to initialize the ORB by
    passing a reference to the current applet in orb_init() (so that you
    invoke something like orb_init(this) [assuming you are extending
    java.applet.Applet]). Pulling up the Java console within your web
    browser should help debug quite a bit (a lot of debug messages will get
    printed there the ORB is having problems).
    Netscape has just implemented the applet caching schemes you describe,
    so it probably shouldn't matter too much if you use another vendor's
    ORB (we've done this with Iona's OrbixWeb). If you use ZIP files, they
    have to be uncompressed, and I don't think that the browser will cache
    them between browser sessions. Netscape 4.0 does seem to handle
    compressed JAR files just fine and it does indeed cache them between
    browser sessions. I'd go with the JAR format anyway since the ZIP
    bundling was just a workaround until Sun got their act together in the
    1.1 JDK.
    By the way, you also might want to take advantage of the code-signing
    and capabilities APIs of Netscape if you are going to invoke methods on
    objects not resident on your web server. Otherwise, you will probably
    run into the (in)famous browser applet security restrictions and you may
    have other problems doing things like callbacks from Forte, etc.
    If you want more detail on how it works, let me know and I can post some
    examples.
    Oh, one last thing: we are a consulting firm specializing in these kinds
    of things :)
    Bill
    Subject: Java Applet IIOP Call-In with Release 3C--How do we speed up download time.
    Date: Wed, 2 Jul 1997 09:10:31 -0500
    From: Michael Nelson <[email protected]>
    To: "'[email protected]'" <[email protected]>
    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time
    for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the
    net
    are not uncommon. We dialed into our network at 28.8K (but no
    hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since
    the
    introduction of Netscape Navigator 3.0, you can specify an
    uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes
    from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP
    connections
    required to fetch applet code. As an added benefit, Netscape caches
    the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation
    for
    its development was so that Java applets and their requisite
    components
    can be downloaded to a browser in a single HTTP transaction, rather
    than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces
    the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to
    work.
    Has any one used these or other approaches to speed up applet
    download
    time? Or, does anyone know of consulting firms that specialize in
    this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157
    Billy L. Williams, Jr. | email: [email protected]
    Sage Solutions, Inc. | Tel: (415) 392-7243 (x506) Fax: (415) 391-3899
    | Pager: (415) 605-1791 (page me if urgent)

  • COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET: US$20 AWARD FOR SOLUTION!

    COMMUNICATION BETWEEN JAVASCRIPT AND JAVA APPLET PROBLEM (Easy Filter Java Applet) -
    US$20 TO ANYONE WHO CAN RESOLVE THE PROBLEM
    To forum visitors:
    I am prepared to pay a standard shareware fee of US$20 to a user who can resolve this technical problem.
    If your advice resolves the problem, I'll forward the payment to your postal address (include your
    address with your reply, and also your email address)
    I am attempting to enable a HTML button (using Javascript's onClick command) to directly input a number into one of the parameter text boxes in the Easy Filter Java applet (ie, enter a new color value number in the text field of the standard Colors Multiplicator Filter interface).
    The applet is Freeware and can be downloaded at: http://www.javazoom.net/applets/easyfilter10/EasyFilter10.html
    (It is a very effective bitmap display and editing utility)
    To achieve this, I am trying to access the part of the applet that defines and sets the textbox. The text box is defined in the .class file by accessing the parameter details in the genericfilter.txt file (accompanies the .class files). I need to access 'private String appletInitialize()' and then one of the 'textFieldParameters' which sets the textbox.
    I understand the basic syntax for referencing the applet:
    document.appletname.setString("An example"). However, accessing the text fields in this applet is more complex!!
    Please can you recommend the correct Javascript syntax to achieve communication with the applet.
    Thank you for your kind assistance.
    JM Graham
    [email protected]
    The Java source code for the applet: EasyFilter.class
    # Easy Filter - E.B/JavaZOOM 1999 #
    # Contact: [email protected] #
    # http://javazoom.hypermart.net #
    /* Originally compiled from EasyFilter.java */
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.applet.Applet;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.image.MemoryImageSource;
    import java.awt.image.PixelGrabber;
    import java.util.Vector;
    public synchronized class EasyFilter extends Applet implements KeyListener
    private String paramFileName;
    private Color bgColor;
    private Color fgColor;
    private Color parColor;
    private Color sepColor;
    private Color titleColor;
    private Color helpColor;
    private int WinWidth;
    private int WinHeight;
    private String title;
    private String logoFileName;
    private String originalImageFileName;
    private String filteredCaption;
    private String originalCaption;
    private Vector paramsName;
    private Vector paramsValue;
    private Vector paramsComment;
    private Panel panelParameters[];
    private Label labelParameters[];
    private TextField textFieldParameters[];
    private Label labelComments[];
    private int nbParameters;
    private ScrollPane scrollPaneParams;
    private Panel panelParams;
    private Image theLogo;
    private Image theOriginalImage;
    private Image theFilteredImage;
    private int theOriginalPixelArray[];
    private int logoWidth;
    private int logoHeight;
    private int imageWidth;
    private int imageHeight;
    private drawCanvas canvasTitle;
    private Panel panelTitle;
    private Label labelTitle;
    private Panel panelImages;
    private Panel panelOriginalImage;
    private drawCanvas canvasOriginalImage;
    private Label labelOriginalImage;
    private Panel panelFilteredImage;
    private drawCanvas canvasFilteredImage;
    private Label labelFilteredImage;
    private Panel panelHelp;
    private Label labelHelp;
    private int Yspc;
    private FilterImplementation theFilter;
    public void init()
    String string = null;
    string = appletInitialize();
    setBackground(bgColor);
    if (string != null)
    removeAll();
    setBackground(Color.white);
    setForeground(Color.black);
    Label label = new Label(new StringBuffer("Error: ").append(string).toString(), 1);
    Panel panel = new Panel();
    panel.add(label);
    add(panel);
    setLayout(new FlowLayout(1, 5, Yspc));
    public void keyPressed(KeyEvent keyEvent)
    panelHelp.removeAll();
    boolean flag = true;
    if (KeyEvent.getKeyText(keyEvent.getKeyCode()).equals("Enter"))
    for (int i = 0; i < nbParameters; )
    try
    paramsValue.setElementAt(new Double(textFieldParameters.getText()), i);
    i++;
    catch (NumberFormatException e)
    labelHelp.setText(labelParameters[i].getText() + ": Not a Number");
    flag = false;
    break;
    if (flag == 1)
    labelHelp.setText(" .... Running, please wait .... ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    theFilter.updateParameters(paramsValue);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    canvasFilteredImage.repaint();
    panelHelp.removeAll();
    labelHelp.setText("- Done -");
    else
    labelHelp.setText("- Press Enter to run the Filter -");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    panelHelp.doLayout();
    public void keyReleased(KeyEvent keyEvent)
    public void keyTyped(KeyEvent keyEvent)
    private String appletInitialize()
    WinWidth = size().width;
    WinHeight = size().height;
    if (getParameter("bgcolor") == null)
    bgColor = new Color(0, 0, 40);
    else
    bgColor = new Color(Integer.parseInt(getParameter("bgcolor"), 16));
    if (getParameter("fgcolor") == null)
    fgColor = new Color(255, 255, 255);
    else
    fgColor = new Color(Integer.parseInt(getParameter("fgcolor"), 16));
    if (getParameter("sepcolor") == null)
    sepColor = new Color(158, 128, 128);
    else
    sepColor = new Color(Integer.parseInt(getParameter("sepcolor"), 16));
    if (getParameter("parcolor") == null)
    parColor = new Color(24, 24, 24);
    else
    parColor = new Color(Integer.parseInt(getParameter("parcolor"), 16));
    if (getParameter("titlecolor") == null)
    titleColor = new Color(255, 255, 0);
    else
    titleColor = new Color(Integer.parseInt(getParameter("titlecolor"), 16));
    if (getParameter("helpcolor") == null)
    helpColor = new Color(0, 255, 255);
    else
    helpColor = new Color(Integer.parseInt(getParameter("helpcolor"), 16));
    paramsName = new Vector();
    paramsValue = new Vector();
    paramsComment = new Vector();
    paramFileName = getParameter("paramfile");
    String string = readParams(paramFileName);
    if (string != null)
    return string;
    MediaTracker mediaTracker = new MediaTracker(this);
    theOriginalImage = getImage(getDocumentBase(), originalImageFileName);
    mediaTracker.addImage(theOriginalImage, 0);
    if (logoFileName != null)
    theLogo = getImage(getDocumentBase(), logoFileName);
    mediaTracker.addImage(theLogo, 1);
    try
    mediaTracker.waitForAll();
    catch (InterruptedException e1)
    return "Error while loading image";
    if (mediaTracker.isErrorAny())
    return "Error while loading image";
    if (logoFileName != null)
    logoWidth = theLogo.getWidth(this);
    logoHeight = theLogo.getHeight(this);
    imageWidth = theOriginalImage.getWidth(this);
    imageHeight = theOriginalImage.getHeight(this);
    theOriginalPixelArray = new int[imageWidth * imageHeight];
    PixelGrabber pixelGrabber = new PixelGrabber(theOriginalImage, 0, 0, imageWidth, imageHeight, theOriginalPixelArray, 0, imageWidth);
    try
    pixelGrabber.grabPixels();
    panelTitle = new Panel();
    canvasTitle = new drawCanvas();
    labelTitle = new Label();
    panelTitle.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelTitle);
    panelTitle.setBackground(bgColor);
    panelTitle.add(canvasTitle);
    canvasTitle.setImage(theLogo);
    canvasTitle.setBounds(0, 0, logoWidth, logoHeight);
    labelTitle.setText(title);
    catch (InterruptedException e2)
    return "Internal Error, Try RELOAD !";
    if (title != null)
    panelTitle.add(labelTitle);
    labelTitle.setForeground(titleColor);
    labelTitle.setFont(new Font("Dialog", 1, 14));
    panelImages = new Panel();
    panelOriginalImage = new Panel();
    canvasOriginalImage = new drawCanvas();
    labelOriginalImage = new Label();
    panelFilteredImage = new Panel();
    canvasFilteredImage = new drawCanvas();
    labelFilteredImage = new Label();
    panelImages.setLayout(new FlowLayout(1, 10, Yspc));
    add(panelImages);
    panelImages.setBackground(bgColor);
    panelOriginalImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelOriginalImage);
    panelOriginalImage.setBackground(Color.black);
    panelOriginalImage.add("Center", canvasOriginalImage);
    canvasOriginalImage.setImage(theOriginalImage);
    canvasOriginalImage.setBounds(0, 0, imageWidth, imageHeight);
    labelOriginalImage.setText(originalCaption);
    labelOriginalImage.setAlignment(1);
    panelOriginalImage.add("South", labelOriginalImage);
    labelOriginalImage.setBackground(Color.lightGray);
    labelOriginalImage.setForeground(Color.black);
    labelOriginalImage.setFont(new Font("SansSerif", 0, 10));
    panelFilteredImage.setLayout(new BorderLayout(0, 2));
    panelImages.add(panelFilteredImage);
    panelFilteredImage.setBackground(Color.black);
    panelFilteredImage.add("Center", canvasFilteredImage);
    theFilter = new FilterImplementation(paramsValue, theOriginalPixelArray, imageWidth, imageHeight);
    theFilter.computeFilter();
    theFilteredImage = createImage(new MemoryImageSource(theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight(), theFilter.getFinalImageBuffer(), 0, theFilter.getFinalImageWidth()));
    canvasFilteredImage.setImage(theFilteredImage);
    canvasFilteredImage.setBounds(0, 0, theFilter.getFinalImageWidth(), theFilter.getFinalImageHeight());
    labelFilteredImage.setText(filteredCaption);
    labelFilteredImage.setAlignment(1);
    panelFilteredImage.add("South", labelFilteredImage);
    labelFilteredImage.setBackground(Color.lightGray);
    labelFilteredImage.setFont(new Font("SansSerif", 0, 10));
    scrollPaneParams = new ScrollPane(0);
    panelParams = new Panel();
    nbParameters = paramsName.size();
    int i = WinHeight - (33 + 7 * Yspc + logoHeight + imageHeight + 23);
    if (i < Yspc + 2 + 24)
    i = Yspc + 2 + 24;
    scrollPaneParams.setBounds(0, 0, WinWidth - 10, i);
    panelParams.setLayout(new GridLayout(nbParameters, 1, 5, Yspc / 2));
    scrollPaneParams.add(panelParams);
    panelParams.setBackground(sepColor);
    panelParameters = new Panel[nbParameters];
    labelParameters = new Label[nbParameters];
    textFieldParameters = new TextField[nbParameters];
    labelComments = new Label[nbParameters];
    for (int j = 0; j < nbParameters; j++)
    panelParameters[j] = new Panel();
    panelParameters[j].setLayout(new FlowLayout(0, 5, 1));
    panelParams.add(panelParameters[j]);
    panelParameters[j].setBackground(parColor);
    labelParameters[j] = new Label();
    labelParameters[j].setText((String)paramsName.elementAt(j));
    panelParameters[j].add(labelParameters[j]);
    labelParameters[j].setForeground(fgColor);
    labelParameters[j].setFont(new Font("Dialog", 1, 12));
    textFieldParameters[j] = new TextField(8);
    textFieldParameters[j].setText(paramsValue.elementAt(j).toString());
    panelParameters[j].add(textFieldParameters[j]);
    textFieldParameters[j].setBackground(fgColor);
    textFieldParameters[j].addKeyListener(this);
    labelComments[j] = new Label();
    labelComments[j].setText((String)paramsComment.elementAt(j));
    panelParameters[j].add(labelComments[j]);
    labelComments[j].setForeground(fgColor);
    add(scrollPaneParams);
    panelHelp = new Panel();
    labelHelp = new Label();
    panelHelp.setLayout(new FlowLayout(1, 5, 0));
    add(panelHelp);
    panelHelp.setBackground(bgColor);
    labelHelp.setText(" Change colour values and press enter ");
    labelHelp.setAlignment(1);
    panelHelp.add(labelHelp);
    labelHelp.setForeground(helpColor);
    return null;
    private String readParams(String string1)
    Object object1;
    String string2;
    if (string1 == null)
    return "Filename of filter's parameters needed";
    try
    URL uRL = new URL(getDocumentBase(), string1);
    URLConnection uRLConnection = uRL.openConnection();
    uRLConnection.setDoInput(true);
    uRLConnection.setUseCaches(false);
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(uRLConnection.getInputStream()));
    string2 = null;
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    catch ()
    return object1.getMessage();
    if (bufferedReader != null)
    Object object2;
    try
    for (object2 = bufferedReader.readLine(); object2 != null && string2 == null; object2 = bufferedReader.readLine())
    string2 = extractFormat(object2);
    catch ()
    string2 = object2.getMessage();
    finally
    bufferedReader.close();
    if (string2 != null)
    return string2;
    else
    return null;
    private String extractFormat(String string1)
    if (string1.length() == 0)
    return null;
    int i = 0;
    int j = string1.indexOf(" ", i);
    if (j == -1)
    return "Bad format error (space missing)";
    String string2 = string1.substring(i, j);
    if (string2.equals("TITLE"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in TITLE missing)";
    title = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in ORIGINALCAPTION missing)";
    originalCaption = string1.substring(i, j);
    return null;
    if (string2.equals("FILTEREDCAPTION"))
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in FILTEREDCAPTION missing)";
    filteredCaption = string1.substring(i, j);
    return null;
    if (string2.equals("LOGO"))
    i = j + 1;
    j = string1.length();
    logoFileName = string1.substring(i, j);
    return null;
    if (string2.equals("ORIGINALIMAGE"))
    i = j + 1;
    j = string1.length();
    originalImageFileName = string1.substring(i, j);
    return null;
    if (!string2.equals("PARAM"))
    return null;
    i = j;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    paramsName.addElement(string1.substring(i, j));
    i = j + 2;
    j = string1.indexOf(32, i);
    if (j == -1)
    return "Bad format in a PARAM line";
    try
    paramsValue.addElement(new Double(string1.substring(i, j)));
    j = string1.indexOf(34, i);
    catch (NumberFormatException e)
    return "Bad format in a PARAM line";
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    i = j + 1;
    j = string1.indexOf(34, i);
    if (j == -1)
    return "Bad format (Double quote in PARAM comment missing)";
    paramsComment.addElement(string1.substring(i, j));
    return null;
    public EasyFilter()
    logoHeight = 33;
    Yspc = 5;

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Java Applet IIOP Call-In with Release 3C--How do we speed updownload ti

    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the net
    are not uncommon. We dialed into our network at 28.8K (but no hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since the
    introduction of Netscape Navigator 3.0, you can specify an uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP connections
    required to fetch applet code. As an added benefit, Netscape caches the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation for
    its development was so that Java applets and their requisite components
    can be downloaded to a browser in a single HTTP transaction, rather than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to work.
    Has any one used these or other approaches to speed up applet download
    time? Or, does anyone know of consulting firms that specialize in this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157

    We have successfully implemented a simple Java Applet that calls into
    Forte Services via IIOP. However, the duration of the download time for
    Applet and its required class files is UNACCEPTABLE in a typical
    INTERNET environment where 28.8K modems and multiple hops around the net
    are not uncommon. We dialed into our network at 28.8K (but no hopping),
    and found that download times varied from 1.5 - 2.0 minutes. This is
    unacceptable, even by internet standards. We have been using the
    Visigenic Visibroker product as the ORB.
    After doing some investigation, we've come up with several ideas to
    speed up download time:
    1. Figure out how to use the Visigenic components (CORBA/IIOP class
    files) that come bundled with the latest version of the Netscape
    Navigator browser, so that they don't have to be downloaded
    2. Figure out how to use ZIP files. Here's what I've read: "Since the
    introduction of Netscape Navigator 3.0, you can specify an uncompressed
    .zip file as an addition to the code base of your application. By
    specifying a ZIP file, the browser will load your applet's classes from
    a specified ZIP file before it searches the code base. This ZIP can
    improve applet download time by reducing the number of HTTP connections
    required to fetch applet code. As an added benefit, Netscape caches the
    single ZIP file so that it will not reload your applet unless the date
    of the ZIP file has changed."
    3. Figure out how to use JAR files. Here's what I've read: "JAR
    stands for Java archive. It's a file format based on the popular ZIP
    file format and is used for aggregating many files into one. Although
    JAR can be used as a general archiving tool, the primary motivation for
    its development was so that Java applets and their requisite components
    can be downloaded to a browser in a single HTTP transaction, rather than
    opening a new connection for each piece. This greatly improves the
    speed with which an applet can be loaded onto a web page and begin
    functioning. The JAR format also supports compression, which reduces the
    size of the file and improves download time still further."
    Unfortunately, we've been unable to get any of these approaches to work.
    Has any one used these or other approaches to speed up applet download
    time? Or, does anyone know of consulting firms that specialize in this
    sort of thing?
    Thanks in advance for your help.
    Mike Nelson, Project Leader
    Metrix, Inc.
    [email protected]
    414-798-8560 x1157

  • JRE7 Update 13 blocking java applet from calling javascript functions

    Hi there,
    I'm having a problem where I have a javascript web app that launches an applet that communicates back to the javascript via invoking javascipt methods. It uses the method call from netscape.javascript.JSObject to achieve this. Pre JRE7 Update 13, everything worked fine, but now whenever I try to call a javascript method, it throws a netscape.javascript.JSException: No such method "..." on JavaScript object . This happens only on Firefox and Chrome; however it still works fine in Internet Explorer. Are there some new security settings in JRE7u13 that need to be addressed in order to allow javascript method calling, or is it a Java/Firefox/Chrome bug?
    Thank you for any help!

    I've filed a bug https://bugzilla.mozilla.org/show_bug.cgi?id=839967 but I'm having problems reproducing it in a testcase...everything works. Quite baffling, our application that had worked and still works with other browsers and with an old version of firefox (12) stopped working with the Java 7 update 13.

  • How to write javascript in java class method

    Hi,
    any one please resolved this,
    i want to write javascript window closing code into java class method, in that method i want to write javascript code & wanted to call in jsf page on commandButton action event,
    my code is below but it is not working properly
    public void closeWindowClicked(ActionEvent event) {
              try
         FacesContext facesContext = FacesContext.getCurrentInstance();
         String javaScriptText = "window.close();";
         // Add the Javascript to the rendered page's header for immediate execution
         AddResource addResource = AddResourceFactory.getInstance(facesContext);
         addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);
    catch(Exception e)
         System.out.println(""+e);
    for calling into jsf code is below
    <h:commandButton action="#{parentBean.closeWindowClicked}" value="OK" />
    /*Note- i want to closed the window by caling method contain javascript only, i don't want any ajax code in method */
    please any one can resolved this.
    Thanks

    /*Note- i want to closed the window by caling method contain javascript only, i
    don't want any ajax code in method */ When the user presses your button, do your business logic and then send them to a page containing the following (note: untested code ahead):
    <html>
    <head>
        function onLoadHandler()
            window.close();
    </head>
    <body onload="onLoadHandler();">
        <p>Window closing....</p>
    </body>
    </html>

  • Javascript to java - applet.requestfocus hangs browser

    Following is my javascript which invokes the method jsSetFocus() on the applet to set focus on a button in applet.
    <script>
    function appletSetFocus() {
    document.applet.jsSetFocus();
    document.applet.requestFocus(); //this line has problem
    window.onfocus = appletSetFocus;
    </script>
    Everything works perfectly on the first invocation of the applet. When i hit the refresh button to reload the applet the browser hangs. If i go to some other page and then come back to the applet the second time in this case also it is working properly.
    The problem occurs on the refresh button and only on the requestfocus line. If this line is commented, then
    everything is great again....
    I am using 1.3.1, IE 5.5 sp1, NT4 sp6.
    Can anyone help?
    Vineet.

    Forgot to mention... the problem comes only when i hit refresh and go to some other window and try to come back to the window with the applet... that when the javascript function is invoked.
    Vineet

  • The AcquireConnection method call failed with error code 0xC0202009.

    I've seen the previous threads on this (although maybe not all of them). However, i don't think I'm getting the error for the same reason. The full error I'm getting is:
    - Pre-execute (Error)
    Messages
    Error 0xc0202009: {F1B3B35C-FAE3-48F6-A169-4E4D8D99F9B6}: An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft JET Database Engine"  Hresult: 0x80004005  Description: "Unspecified error".
     (SQL Server Import and Export Wizard)
    Error 0xc020801c: Data Flow Task: The AcquireConnection method call to the connection manager "DestinationConnectionExcel" failed with error code 0xC0202009.
     (SQL Server Import and Export Wizard)
    Error 0xc004701a: Data Flow Task: component "Destination 64 - production_effectivities" (7042) failed the pre-execute phase and returned error code 0xC020801C.
     (SQL Server Import and Export Wizard)
    The entire package is running on one machine. The data source is SQL Server 2005 and the destination (this happens with both of them) is Excel or Access. Either way I cannot get the package which the wizard generated to run at all. This error occurs after the first table is exported. I'm running on WinXP SP2 with 2005 Developer and ALL components installed except analysis services.
    Anyone else have this problem or know the solution?
    Jeff

    I am getting the same error. My Destination and source both are on SQL Server 2005 on the same box.
    I am using SQL- Code for Source and and table as destination. When the package runnes under Transaction- TransactionOption-Supported then the packages excuted fine but it fails when i change the Transaction- TransactionOption to Required.
    It fails with following error code.
    [OLE DB Destination [22]] Error: The AcquireConnection method call to the connection manager "FMFCLSQADB01.DWH_Rakesh" failed with error code 0xC0202009.
    [DTS.Pipeline] Error: component "OLE DB Destination" (22) failed the pre-execute phase and returned error code 0xC020801C.
    [Connection manager "FMFCLSQADB01.DWH_Rakesh"] Error: The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction.".
    [Connection manager "FMFCLSQADB01.DWH_Rakesh"] Error: An OLE DB error has occurred. Error code: 0x8004D00A.
    When i change the source SQL query to Table or View then it works fine.
    Thanks for any suggestion.
    Regards
    Rakesh
    Now, my issues related to “SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D00A "Unable to enlist in the transaction."…..”. are fixed.
    This is one of the very common errors that comes up in SSIS (SQL Server Integration service) 
    I have faced this issue for at-least two occasions. Both of them have one common setting: “TransactionOption” was set to “Required”.
    In first case, I had multiple dataflow tasks but there were no sequence given. There were no error if I ran the package with TransactionOption=Supported. But when I ran the package in TransactionOption= Required, it got failed.
    To fix the issue I have changed my package and put the entire dataflow task one after another (connected thru Constraint).  
    In another case, where I was doing data transfer from one server to another, I had to configure the MSDTC.

  • Firefox 2.0.0.8 = security alert when calling a Java applet method

    I have a JavaHelp applet that I launch using a method that I called
    from JavaScript when a user clicks on a link.
    A problem I found with Firefox 2.0.0.8 and JRE 1.4 is that when I
    click on the link it will try to display a security alert window, but
    the window appears to freeze up when it is being displayed and hangs
    the browser. For example, I cannot see any of the buttons that should
    be on the security window. Rather the main window is empty. However,
    if my applet exposes a button that the user can directly click, the
    security window displays properly and can be dismissed.
    With the same JavaHelp applet, the link works fine if I use it Firefox
    2.0 and JRE 1.6 or JRE 1.5, and with IE 6.0 and IE 7.0. I uninstalled
    and reinstalled Firefox with JRE 1.4, and I couldn't reproduce the
    problem. However, I'm concerned that this problem may resurface in
    the future.
    Has anyone ever seem a similar problem? And if so, are there any easy
    workarounds?

    >
    I have a JavaHelp applet.. >I suggest you launch it using Java Web Start (JWS).
    Here is a test of a direct launch of the HelpButton JavaHelp applet.
    <http://www.physci.org/jh/test.html#launch>
    It would only take minor changes to the code to make the button entirely redundant, and have the code automatically launch the HelpViewer, once the user clicks the link to the JNLP launch file.
    That 'JavaHelp/JWS' page is my test page for launching JavaHelp in a variety of forms.

  • Problems with RSA Signed Applets methods called by JavaScript

    Hi Folks,
    I need to give all permissions to an Applet used in an Intranet application, so I signed the jar containing it with a RSA self-cert and I did the same for all the other jar files userd by the applet.
    The applet runs under Java Plugin with JRE 1.5.0_06: I am requested by the browser to install the cert and all works fine.
    When a JavaScript function calls a public method of the applet I received a security exception when the code tries to read a system property.
    The same method works fine if called by the applet itself or by a gui event (i.e. a button click) inside the applet, so the problem seems to be related to the fact the applet is used by JavaScript (in Explorer 6).
    Does anyone know some way to overcome this problem????
    Message was edited by:
    piero

    If I may be so bold as to ask you to elaborate on this fix? I have encountered an identical issue, but I have no idea about your reference to your fix, sorry.

  • JNI static method call fails for the 6th time

    Hello,
    I have a JNI Method which calls the static method which gets reference to singleton class(getReference()), JVM crashes.
    what might be the problem?
    is it due to insufficient memory or any other reason?
    Here is my code.
    eScannerClass = gEnv->FindClass("com/elvista/jscaner/EScanner");
    eScannerContructId = gEnv->GetStaticMethodID(eScannerClass,"getReference","()Lcom/elvista/jscaner/EScanner;");
    eScannerUpdateMethodId = gEnv->GetMethodID(eScannerClass,"updateScanStatus","(Lcom/elvista/jscaner/EScanEvent;)V");
    eScannerObjectRef = gEnv->NewObject(eScannerClass,eScannerContructId);Thanx for any help on this.

    Hi,
    the eScannerContructId is refering a static method, not a constructor. Therefore you must not use gEnv->NewObject, which is only allowed for constructors. Instead you have to use gEnv->CallStaticObjectMethod to call getReference().
    Martin

  • Call Applet method from JavaScript, tiny test program works... SOMETIMES!?

    I have an embedded Applet in a web page, and I am trying to directly call a method in that Applet from the same page, using JavaScript.
    Here is the complete Applet:
    import java.applet.Applet;
    public class Test extends Applet {
      public String test() {
        return "test() method return value";
    }Here is the complete web page:
    <HTML>
    <HEAD><TITLE>Applet Invocation test</TITLE></HEAD>
    <BODY>
    <APPLET CODE="Test" WIDTH=10 HEIGHT=10 NAME="test"></APPLET>
    <HR>
    <SCRIPT>
    document.write( "JavaScript is working<br>" );
    document.write( document.test.test() );
    </SCRIPT>
    </BODY>
    </HTML>Is there anything wrong with this? Because it works about 15% of the time, displaying an <HR>, "JavaScript is working", and then "test() method return value" on the next line.
    The other 85% of the time, it just gets to "JavaScript is working", then I get a JavaScript error "Object does not support this property or method" for the line: document.write( document.test.test() );
    Now here's another weird quirk... I can get it to work ALL the time, if I delay the execution of the Applet method. For example, if the first line after <SCRIPT> is alert( "alert" ); then the user gets a little dialog box with "alert" message in it, and when they hit OK execution continues, and the applet method call ALWAYS works. (On a side note, if I make the Applet test() method static, it NEVER works. Why is this?)
    So it seems to me, that when it is failing, it is because the Applet is not completely loaded into the browser yet. My question is, how can I get around this?? Is there a way to instruct JavaScript to wait until the Applet is finished loading before attempting to call any methods on it?
    PS I am using Windows ME and IE 6

    Thanks for the reply, I appreciate it. I have another question, if you don't mind... here is what my new test web page looks like:
    <HTML>
    <HEAD>
    <TITLE>Applet Invocation test</TITLE>
    <SCRIPT>
    function testFunc()
      document.write( document.test.test() );
    </SCRIPT>
    </HEAD>
    <BODY onLoad="testFunc()">
    <APPLET CODE="Test" WIDTH=10 HEIGHT=10 NAME="test">
    </APPLET>
    <HR>
    </BODY>
    </HTML>What happens is: the page loads, I see a 10x10 grey applet box, and a <HR>... then a split second later, onLoad is fired, and everything on the page so far is REPLACED with the output of testFunc(), so the ONLY thing on the page after this all completes is "test() method return value"
    Why is a single document.write() statement CLEARING the page before outputting? I don't understand. If calling a document.write() from an onLoad event wipes out everything on the page, this is not extremely helpful solution.

  • AcquireConnection method call to the connection manager Excel connection Manager failed

    I used VS Studio 2008 (BIDS version 10.50.2500.0) on an WinXp machine (v 5.1.2600 SP3 Build 2600) to create a package that writes multiple query results to different tabbed sheets of a single excel spreadsheet. The package was working just fine and has run
    successfully multiple times, but all of a sudden when opening the project, every single Data Flow task with an Excel Connection Manager displayed error icons. Each raises the following error message when attempting to open the Advanced Editor:
    SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005 Description: "Unspecified error". Error at DataFlow task name: SSIS error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method
    call to the connection manager Excel connection Manager failed with error code 0xC0202009. There may be error messages posted before this with more information on why the Acquire Connection method call failed. Exception from HRESULT: 0Xc020801c (Microsoft.SQlServer.DTSPipelineWrap)
    From the time I created the original package (when it worked fine) until now:
     1) I have been using the same computer, the same login account and the same permissions.
     2) I have been writing to the same (32 bit) 2010 Excel file (which I created) in a folder on my local machine.
     3) The filename and location have not changed; a template file is used each time to move and overwrite the previous file. Both are in the same locations.
     4) I can independently open the target Excel file and the template Excel files with no errors.
     6) The ConnectionString has not changed. The Connnection String I am using is
      Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Conversion\Conversion\Results_dt01.xlsx;Extended Properties="EXCEL 12.0 XML;HDR=YES;".
     7) Run64BitRuntime is set to False.
    8)  Delay Validation is set to true
    9) This is not running under a SQL job  
    10) There are no child packages being run
    I CAN create a NEW Excel Connection Manager, assigning it the exact same target Excel spreadsheet, successfully, but when I attempt to assign it to the Data Flow destination this error occurs:
    "Test connection failed because of an error in initializing provider. Unspecified error."
    Thinking that the driver might be corrupt, I opened a second SSIS package, which also uses the Excel Connection Manager (same driver) and this package continues to work fine on the same workstation with no errors.
    I have searched online for causes of this error for many hours and found nothing that helps me to solve this issue.
    Does anyone have any suggestions for me?

    Yes, I have verified that the Excel file is not in use or opened by anyone, including me. It has been two months since I opened this particular package, although I have been working with other packages in this project. I just discovered that another
    package in the same project has the same problem - all Data Flows that output to an Excel Destination now have the same error icons. This second packages outputs to an entirely different Excel file than in the first package.  A summay:
    Package #1 has error on every Excel Destination and uses templateA to overwrite fileA and then writes to fileA
    Package #2 has error on every Excel Desintation and uses templateB to overwrite fileB and then writes to fileB
    Package #3 has no error on any Excel Destination and is linked to multiple files (none are A or B)
    Package #1 and #2 are in the same project, but Package #3 is in a separate project .
    I will try replacing the Excel files with new ones for Package 1 and 2.

  • Can Java Applet Call the ASP Page

    Hi,
    I would like to know whether the Java Applet can call the ASP page.
    If it can be done, how does the Java Applet get the value from ASP page?
    Please provide me some running example.
    Thanks.

    I would like to know whether the Java Applet can
    an call the ASP page.Something like:
    AppletContext.showDocument(new URL("http://wherever/myPage.asp"), "_blank");
    how does the Java Applet get the value from ASP page?What?
    Please provide me some running example.Nope.

  • Scripting Java Applets in IE 6.0

    Does anyone know if it's possible to script applets (talk back and forth between javascript and an applet) using IE 6.0 or later??

    I didn't know about that one.
    Where to get this package? I couldn't find it. All I found at that horrible banner website of netscape.com was the documentation:
    http://wp.netscape.com/eng/mozilla/3.0/handbook/plugins/doc/packages.html
    I was trying something else (maybe somewhat quick and dirty) and am able to call Java Applet methods (functions) from Javascript and have the Applet reply (return) a value. It's quite straightforeward, so I didn't add comments in the coding.
    Here is my HTML/Javascript coding:
    <HTML><HEAD>
    <SCRIPT LANGUAGE="Javascript">
    obj = null;
    function init(){
    obj = (document.all)? document.all.myApplet: document.applets.myApplet;
    function set(s){
    alert( "Applet replies: "+ obj.set(s) );
    </SCRIPT>
    </HEAD><BODY onLoad="init();">
    <APPLET NAME="myApplet" CODE='Javascript2Java.class' WIDTH='200' HEIGHT='50'></APPLET>
    <br>
    Hi | Hey | ...
    </BODY></HTML>
    Here is my Java coding:
    import java.applet.Applet;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.TextField;
    import java.lang.String;
    public class Javascript2Java extends Applet{
    private TextField Info;
    public void init(){
    Info = new TextField("", 20);
    setBackground(Color.white);
    setEnabled(false);
    add(Info);
    public String set(String s){
    Info.setText(s);
    return s+" to u too.";
    public void paint(Graphics g){

Maybe you are looking for