java.security.AccessControlException:

B

BADBOY

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.
 
B

BADBOY

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
 
A

Andrew Thompson

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.
 
A

Andrew Thompson

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
 
B

BADBOY

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
:) )
 
A

Andrew Thompson

...
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.

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
 
A

Andrew Thompson

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

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

BADBOY

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
 
R

Roedy Green

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top