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 & HelpIntegration › writing reading online database using java applet
Page Index Toggle Pages: 1
writing reading online database using java applet (Read 1912 times)
writing reading online database using java applet
Aug 11th, 2009, 5:46am
 
Hello everyone, we just develop a small processing applet which is accesible online and has to read a write data entered by the user.

We have used mysql library because we were having problems to get other solutions working  on an online environment (text file, xml file). At the moment the app is capable of accessing an online mysql database, writing and reading data but only when the app is executed locally within processing and not as an embedded java applet.

We cant find any similar example to use as a guide, there are plenty of them reading data offline but very few online applets writing data. Any ideas?

many thanks!
Re: writing reading online database using java applet
Reply #1 - Aug 11th, 2009, 9:57am
 
> there are plenty of them reading data offline but very few online applets writing data. Any ideas?

this is by design. applets are sandboxed to stop them creating files on other people's systems.

http://java.sun.com/docs/books/tutorial/deployment/applet/security.html
Re: writing reading online database using java applet
Reply #2 - Aug 16th, 2009, 3:45am
 
How are you accessing the MySQL base?
If that's directly, using JDBC, it is "dangerous", because one can decompile the applet to get the user name and password (unless you crypt them, etc.). Can be OK for intranet usage...
Common/typical usage just to communicate with a server with a Web API, the server side (PHP or other) doing the database connections.
Page Index Toggle Pages: 1