Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookies 1

Status
Not open for further replies.

scohan

Programmer
Dec 29, 2000
283
US
Would it be possible to write an applet that a user can download that can present the user with a list of cookies on their PC and allow them to delete one or more of them?
 
why don't u just launch explorer and go to the right directory yourself. delete them manually????

if your applet has permissions to read and delete the cookies, yeah, sure its possible
 
How do you grant it the permissions?
 
this has to be done on ALL machines the applet wil run on. you have to update the security policy file to grand permissions for your applet.

look under c:\jdk1.3\jre\lib\security\java.policy..or where every you have installed the jdk. there is also a program called policytool.exe...have a look at this
 
Thanks for the help. As to your question 'why don't u just launch explorer and go to the right directory yourself. delete them manually????'

A client wants this little utility so I have to research it.

Thansk again.
 
So this java.policy file has to be updated on all PCs running the applet? What if we want them to download it from the internet and we don't have control over their PCs? Would wwe update the file during with an install shield or something?

What's the sandbox? Someone mentioned the java sandbox and that you have access to everytthing in the sandbox. He was thinking the cookies are in the sandbox so we have access to them.
 
the sandbox is java security concept. you have total control over that ever is in your sandbox unless your policy file states otherwise. anything outside, you can't touch. thats why applets are supposed to be safe to run and run in your browser(its sandbox) only.

i don't know if cookies are within the sandbox. if so, your laughing although i can't see any classes or methods that read or reference cookies....doesn't mean they're not there though!! :)

you can do it during the install shield process but remember, if you do that, you will be changing peoples security policy, probably without telling them about it. americans tend to get quite peeved about things this!

u can grand special priviledges to particular classes when they are loaded into memory. see java.security.Permissions java.security.Security etc...
 
Thanks, LittleWing. I'll start digging.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top