java.security.AccessControlException:

Discussion in 'Java' started by BADBOY, Jul 9, 2004.

  1. BADBOY

    BADBOY Guest

    Hi i am trying to write a simple login applet for a website.(am very new to
    applet-servlet programming)
    After a little struggle i managed to get my applet to post to servlet, but
    get the following exception:

    java.security.AccessControlException: access denied
    (java.util.PropertyPermission http.strictPostRedirect read)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at java.lang.Boolean.getBoolean(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.followRedirect(Unknown
    Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    Source)
    at LoginApplet.LoginApplet.doLogin(LoginApplet.java:222)

    at first i thought it might be because my applet wasnt signed, so i changed
    all the security settings in Iexplorer so an unsigned applet was allowed
    todo anything.
    This hasnt made any difference.....I`m now at a loss.
    My only incling is that it might be related to those (Unkown Source) bits.

    Dont suppose someone could point me in the right direction :)

    Many Thanx in advance
    Jonney.
     
    BADBOY, Jul 9, 2004
    #1
    1. Advertising

  2. BADBOY

    BADBOY Guest

    Hi i dont know if anyones read this thread or not, but anyway...
    I think ive traced the problem to the (java.util.PropertyPermission
    http.strictPostRedirect read) bit.
    why is the post being redirected ?
    the servlet is being installed to the root of site, and as far as i`m aware
    this is correct (assuming ive read documentation correctly).
    Server log files show a http 302 (redirect)error but documentation says
    this normally shouldnt affect anything and the client should receive what
    its supposed to.
    Am i barking completly up the wrong tree or what ??

    Thanks again Jonney

    "BADBOY" <> wrote in message
    news:b8nHc.1052$...
    > Hi i am trying to write a simple login applet for a website.(am very new

    to
    > applet-servlet programming)
    > After a little struggle i managed to get my applet to post to servlet, but
    > get the following exception:
    >
    > java.security.AccessControlException: access denied
    > (java.util.PropertyPermission http.strictPostRedirect read)
    > at java.security.AccessControlContext.checkPermission(Unknown Source)
    > at java.security.AccessController.checkPermission(Unknown Source)
    > at java.lang.SecurityManager.checkPermission(Unknown Source)
    > at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
    > at java.lang.System.getProperty(Unknown Source)
    > at java.lang.Boolean.getBoolean(Unknown Source)
    > at sun.net.www.protocol.http.HttpURLConnection.followRedirect(Unknown
    > Source)
    > at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
    > Source)
    > at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown
    > Source)
    > at LoginApplet.LoginApplet.doLogin(LoginApplet.java:222)
    >
    > at first i thought it might be because my applet wasnt signed, so i

    changed
    > all the security settings in Iexplorer so an unsigned applet was allowed
    > todo anything.
    > This hasnt made any difference.....I`m now at a loss.
    > My only incling is that it might be related to those (Unkown Source) bits.
    >
    > Dont suppose someone could point me in the right direction :)
    >
    > Many Thanx in advance
    > Jonney.
    >
    >



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004
     
    BADBOY, Jul 10, 2004
    #2
    1. Advertising

  3. On Fri, 09 Jul 2004 02:10:15 GMT, BADBOY wrote:

    I noticed you posted a follow-up, but this
    has more info. so I'll reply to it..

    > Hi i am trying to write a simple login applet for a website.(am very new to
    > applet-servlet programming)

    ....
    > java.security.AccessControlException: access denied

    ....
    > at first i thought it might be because my applet wasnt signed, so i changed
    > all the security settings in Iexplorer so an unsigned applet was allowed
    > todo anything.


    I suspect it is *still* the problem.

    Code an applet that attemps to write
    to the local disk. See if that works.

    If it does it supports that IE now has the
    expanded permissions, else ..provide the URL.

    An URL paints a thousand words.

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 10, 2004
    #3
  4. On Sun, 11 Jul 2004 00:28:56 GMT, BADBOY wrote:

    > Thanx for the help, you are quite right ie doesnt have the expanded
    > permissions.
    > does this mean i have to purchase a signature.


    No. You can use a 'self-signed' security
    certificate, like I have for the PhySci
    software suite*. The warnings are horrendous
    (check the link on the page for a sample dialog)
    but it works.

    * <http://www.physci.org/install/download.jsp>

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 11, 2004
    #4
  5. BADBOY

    BADBOY Guest

    Thanx for the help, you are quite right ie doesnt have the expanded
    permissions.
    does this mean i have to purchase a signature.(I was hoping to not have to
    just yet as i might not use this method, was going to try jsp aswell).
    can you get a test signature or something like that ?

    Thanx again (There`ll be a little more hair left on my head now thanx to you
    :) )

    "Andrew Thompson" <> wrote in message
    news:1k17lj0esmqps.1xp6sdh0a6pfq$...
    > Code an applet that attemps to write
    > to the local disk. See if that works.
    > If it does it supports that IE now has the
    > expanded permissions, else ..provide the URL.
     
    BADBOY, Jul 11, 2004
    #5
  6. On Mon, 12 Jul 2004 01:15:18 GMT, BADBOY wrote:
    > "Andrew Thompson" <> wrote in message
    >> On Sun, 11 Jul 2004 00:28:56 GMT, BADBOY wrote:
    >>
    >>> ..you are quite right ie doesnt have the expanded
    >>> permissions.
    >>> does this mean i have to purchase a signature.

    >>
    >> No. You can use a 'self-signed' security
    >> certificate,

    ...
    >> * <http://www.physci.org/install/download.jsp>

    ...
    > Btw i get a java.net.MalformedURLException: no protocol: <html>
    > in the java console, just thought i`d let u know incase you didnt :)


    I didn't, thanks for letting me know. That
    is about an applet on the bottom of the page
    though, not the install itself. The install
    works fine, I just tested it.

    > Regarding Webstart....
    > http://mindprod.com/jgloss/javawebstart.html


    Roedy is a regular contributor here, he may
    see this and comment, but I think that particular
    notet may be a little out of date (the bane of
    having over 14,000 pages on the net is keeping
    the details up to date!). If JWS has not 'changed
    much' it is more likely because Sun feels it
    includes what it needs to.

    > Is there any truth in this as ive never heard it before, and webstart seems
    > a good alternative to use instead of applets, but a bit pointless if this is
    > correct.


    I'd be interested to hear Roedy's perspective on
    this, but I feel you can be quite confident of
    the continuance of JWS. It works well for installs
    and has a large amount of useage currently.

    Even if it was replaced by something better, I
    imagine Sun would be smart enough to make that
    'Backwards Compatible' for JWS.

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 12, 2004
    #6
  7. On Mon, 12 Jul 2004 01:15:18 GMT, BADBOY wrote:

    > Btw i get a java.net.MalformedURLException: no protocol: <html>
    > in the java console, just thought i`d let u know incase you didnt :)

    ...
    >> * <http://www.physci.org/install/download.jsp>


    Seems I spoke too soon when I said the install
    worked fine, it looks like a problem with my
    files on the server.. :-(

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 12, 2004
    #7
  8. BADBOY

    BADBOY Guest

    Hi thanx for the help.
    Btw i get a java.net.MalformedURLException: no protocol: <html>
    in the java console, just thought i`d let u know incase you didnt :)

    Regarding Webstart....
    http://mindprod.com/jgloss/javawebstart.html
    Whilst looking for info on signing applets i came across the above site, it
    mentions several times the fact that webstart might be orphaned in the
    future.
    Is there any truth in this as ive never heard it before, and webstart seems
    a good alternative to use instead of applets, but a bit pointless if this is
    correct.

    Jonney

    "Andrew Thompson" <> wrote in message
    news:17jrhjllglijx$.1f46lod8qc02e$...
    > On Sun, 11 Jul 2004 00:28:56 GMT, BADBOY wrote:
    >
    > > Thanx for the help, you are quite right ie doesnt have the expanded
    > > permissions.
    > > does this mean i have to purchase a signature.

    >
    > No. You can use a 'self-signed' security
    > certificate, like I have for the PhySci
    > software suite*. The warnings are horrendous
    > (check the link on the page for a sample dialog)
    > but it works.
    >
    > * <http://www.physci.org/install/download.jsp>
    >
    > HTH
    >
    > --
    > Andrew Thompson
    > http://www.PhySci.org/ Open-source software suite
    > http://www.PhySci.org/codes/ Web & IT Help
    > http://www.1point1C.org/ Science & Technology
     
    BADBOY, Jul 12, 2004
    #8
  9. BADBOY

    Roedy Green Guest

    On Mon, 12 Jul 2004 01:15:18 GMT, "BADBOY" <>
    wrote or quoted :

    >http://mindprod.com/jgloss/javawebstart.html
    >Whilst looking for info on signing applets i came across the above site, it
    >mentions several times the fact that webstart might be orphaned in the
    >future.
    >Is there any truth in this as ive never heard it before, and webstart seems
    >a good alternative to use instead of applets, but a bit pointless if this is
    >correct.


    There was a time with webstart was stalled, then picked up again at is
    says at that link. The reason I am not totally optimistic is Sun's
    reluctant to fix showstoppers like the cert ok that hides behind a
    splash making it unusable by technopeasants who can't dig it out, and
    making the end user OK every jar separately, even if there are 2 dozen
    of them.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jul 12, 2004
    #9
    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. Thanasis \(sch\)
    Replies:
    0
    Views:
    5,497
    Thanasis \(sch\)
    Mar 1, 2004
  2. Replies:
    1
    Views:
    859
    Matt Humphrey
    Aug 14, 2006
  3. nandu
    Replies:
    3
    Views:
    657
    nandu
    Dec 18, 2006
  4. Z
    Replies:
    3
    Views:
    1,587
  5. merrittr
    Replies:
    10
    Views:
    1,307
    merrittr
    Mar 25, 2007
Loading...

Share This Page