Security exception in System.getProperty("http.proxyHost')

M

Mark Riordan

entitled "Preventing URLConnection from buffering entire output stream"
I indicated that I might have to write my own substitute for
HttpURLConnection because Sun's version buffers the entire
output before posting to the server.

Well, one problem with writing my own is that I need to implement
proxy support. This is an applet, and I would like to use the proxy
settings already set in the browser. HttpURLConnection uses these
automatically. But if I need to roll my own, I'll need to find these
settings for myself.

However, when I call System.getProperty("http.proxyHost"), I get
java.security.PrivilegedActionException
caused by: java.lang.reflect.InvocationTargetException
caused by: java.security.AccessControlException

I was doubtful that the system would cough up the
proxy password, but apparently it won't even tell me the
proxy hostname.

Is there a way around this?

Thanks,

Mark Riordan
Note: email address in header, (e-mail address removed), must have
"NoSpam" removed.
 

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

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top