Applet to Servlet

Discussion in 'Java' started by Sean, Mar 6, 2004.

  1. Sean

    Sean Guest

    Hi, I hope someone can help, this is becoming a really annoying problem.

    I have an applet that sends data to a servlet via POST, and reads in
    serialized data that is returned in the form of a String array. Everything
    works fine, until i run the line:

    ObjectInputStream in = new
    ObjectInputStream(connection.getInputStream());

    which seems to throw an exeption for some reason. The exception message
    given is:

    access denied (java.util.PropertyPermission http.strictPostRedirect read)

    Any ideas? All help would be great, as I am truely stumped

    Thankyou
    Sean, Mar 6, 2004
    #1
    1. Advertising

  2. Sean

    Yan Lijun Guest

    applet could only connect to the server where it was downloaded
    check your connection address



    ÔÚ Sat, 6 Mar 2004 04:46:22 -0000 ʱ, "Sean" <> дÁË:
    --

    >Hi, I hope someone can help, this is becoming a really annoying problem.
    >
    >I have an applet that sends data to a servlet via POST, and reads in
    >serialized data that is returned in the form of a String array. Everything
    >works fine, until i run the line:
    >
    > ObjectInputStream in = new
    >ObjectInputStream(connection.getInputStream());
    >
    >which seems to throw an exeption for some reason. The exception message
    >given is:
    >
    >access denied (java.util.PropertyPermission http.strictPostRedirect read)
    >
    >Any ideas? All help would be great, as I am truely stumped
    >
    >Thankyou
    >
    Yan Lijun, Mar 6, 2004
    #2
    1. Advertising

  3. Sean

    Sean Guest

    Nah, its not that, the applet gathers the protocol, host and port from the
    current codeBase, so there should be no problem. However, there still is :-(


    "Yan Lijun" <> wrote in message
    news:...
    > applet could only connect to the server where it was downloaded
    > check your connection address
    >
    >
    >
    > ÔÚ Sat, 6 Mar 2004 04:46:22 -0000 ʱ, "Sean" <> дÁË

    :
    > --
    >
    > >Hi, I hope someone can help, this is becoming a really annoying problem.
    > >
    > >I have an applet that sends data to a servlet via POST, and reads in
    > >serialized data that is returned in the form of a String array.

    Everything
    > >works fine, until i run the line:
    > >
    > > ObjectInputStream in = new
    > >ObjectInputStream(connection.getInputStream());
    > >
    > >which seems to throw an exeption for some reason. The exception message
    > >given is:
    > >
    > >access denied (java.util.PropertyPermission http.strictPostRedirect read)
    > >
    > >Any ideas? All help would be great, as I am truely stumped
    > >
    > >Thankyou
    > >

    >
    Sean, Mar 6, 2004
    #3
  4. Sean

    BackwardsRunner

    Joined:
    May 14, 2009
    Messages:
    1
    I had that error when the URL that my applet was using to establish the connection did not match what my servlet was actually reacting to and consequently the request was being redirected to the error page, which generated the security exception. Once I corrected the servlet :stupido: the problem was resolved.
    BackwardsRunner, May 14, 2009
    #4
    1. Advertising

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. Andy Fish
    Replies:
    4
    Views:
    2,412
    Andy Fish
    Dec 17, 2003
  2. Sean Clarke
    Replies:
    1
    Views:
    1,891
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    1,993
    Jack Jia
    Apr 4, 2004
  4. chamikara
    Replies:
    1
    Views:
    49,858
  5. Tedy
    Replies:
    1
    Views:
    444
    Andrew Thompson
    Aug 4, 2005
Loading...

Share This Page