We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › creating cookies
Page Index Toggle Pages: 1
creating cookies (Read 348 times)
creating cookies
Feb 18th, 2008, 11:32am
 
Is it possible to create cookies from an applet? Probably yes because I did find 'javax.servlet' but I couldn't get it to work with processing.
I just want to save some xml locally.
Re: creating cookies
Reply #1 - Feb 18th, 2008, 5:22pm
 
I'm pretty sure that the javax.servlet stuff is not what you want -- that's for doing server-side Java, which is completely different from applets, which are considered a client-side environment.

You can probably hack together something by writing some JavaScript functions to create the necessary cookies, putting those JavaScript functions in your HTML file, and then calling those JavaScript functions from within your applet. Note that the support for calling JavaScript from Java applets is not great, but in many cases it works well enough.

http://www.google.com/search?hl=en&q=javascript+cookies

http://www.google.com/search?hl=en&safe=off&q=java+to+javascript+communication
Page Index Toggle Pages: 1