Applet security

Discussion in 'Java' started by Panther240, Oct 29, 2003.

  1. Panther240

    Panther240 Guest

    Hi

    I have a method inside a applet class

    public void print()
    {
    //code
    }
    I am trying to access the method through HTML using <applet></applet>
    I want to do something line Applet.print().
    When I try this it gives me a security exception.
    I signed the applet.I am able to access events on buttons inside the applet.
    void jButton1_actionPerformed(ActionEvent e) {
    System.out.println("Button Action Perfomed....Printing");
    print();
    }//this code works FINE
    But when I do Applet.print(). THIS CODE FAILS-security exception.
    SUGGESTIONS PLEASE
     
    Panther240, Oct 29, 2003
    #1
    1. Advertisements

  2. Andrew Thompson, Oct 29, 2003
    #2
    1. Advertisements

  3. Panther240

    Panther240 Guest

    (Panther240) wrote in message news:<>...
    > Hi
    >
    > I have a method inside a applet class
    >
    > public void print()
    > {
    > //code
    > }
    > I am trying to access the method through HTML using <applet></applet>
    > I want to do something line Applet.print().
    > When I try this it gives me a security exception.
    > I signed the applet.I am able to access events on buttons inside the applet.
    > void jButton1_actionPerformed(ActionEvent e) {
    > System.out.println("Button Action Perfomed....Printing");
    > print();
    > }//this code works FINE
    > But when I do Applet.print(). THIS CODE FAILS-security exception.I TRY THIS IN JAVASCRIPT.(HTML)
    > SUGGESTIONS PLEASE



    But when I do Applet.print(). THIS CODE FAILS-security exception.I
    TRY THIS IN JAVASCRIPT.(HTML)
     
    Panther240, Oct 29, 2003
    #3
  4. "Panther240" <> wrote in message
    news:...
    > (Panther240) wrote in message

    news:<>...
    ....
    > > I have a method inside a applet class
    > >
    > > public void print()

    ....
    > > When I try this it gives me a security exception.
    > > I signed the applet.I am able to access events on buttons inside the

    applet.
    .....
    > But when I do Applet.print(). THIS CODE FAILS-security exception.I
    > TRY THIS IN JAVASCRIPT.(HTML)


    What is your URL? How did you sign the Applet?

    Better help will usually be forthcoming if you can provide
    a small, self-contained, compileable example.
    [ Though in this situation it _seems_ the code is
    not the problem, it is hard to say for sure. ]

    --
    Andrew Thompson
    http://www.AThompson.info/
    http://www.PhySci.org/
    http://www.1point1C.org/
     
    Andrew Thompson, Oct 30, 2003
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Love

    applet vs. canvas in applet

    Rob Love, Jul 7, 2003, in forum: Java
    Replies:
    1
    Views:
    845
    Liu, Chunyen
    Jul 7, 2003
  2. Blah Blah
    Replies:
    0
    Views:
    1,552
    Blah Blah
    Aug 13, 2003
  3. Jade
    Replies:
    3
    Views:
    1,104
    Roedy Green
    Aug 14, 2003
  4. Rune Andresen
    Replies:
    2
    Views:
    2,196
    Phil Powell
    Sep 17, 2003
  5. Your Name

    Applet to Applet Communication

    Your Name, Nov 3, 2003, in forum: Java
    Replies:
    0
    Views:
    488
    Your Name
    Nov 3, 2003
  6. hyena
    Replies:
    2
    Views:
    2,378
    hyena
    Jul 1, 2004
  7. Krista
    Replies:
    3
    Views:
    2,569
    Andrew Thompson
    Sep 15, 2004
  8. crazytazo
    Replies:
    3
    Views:
    1,468
    Daniel Pitts
    Oct 7, 2008
Loading...