Skip to main content

URLConnection with different user

No replies
mika29
Offline
Joined: 2011-09-16
Points: 0

Hi guys, I have an internet application and with this one i wanna open a URLConnection and say to java that I'm not the person that login on pc, but another one.

I explain better: i login on pc with user "john" that couldn't open a url for privileges. Only user "andrew" can open.

If i open Internet Explorer as "andrew" i can view the website, if i open it as normal user ("john") i can't.

So, when i open Eclipse and i do an URLConnection i would that my java try to reach the website as user "andrew", not as "john" that is the logged on user. Can i change users in java code?

Thanks for reply, please help me, is important :)