Let me start by writing that I am new to Java which might explain my question.
I am looking to write a java applet that reads from a Access database table located on the same server. The applet reads the table and creates a formated family tree. The applet can also write new entries into the table.
I know about security exceptions during runtime - but is such a thing possible? That is to say if I upload the html page with the applet on it - can the applet happily read and write to the database if I set up permissions and so forth at the start and then just leave it?
If such an apparently straight foward way of creating my family tree thing is not possible - what would be the next most likely solution?
I would appreciate any advice to point me in the right direction..
The only way I know of doing so is to pass the information to a servlet on the server, and let the servlet do the work. There are a ton of examples on the 'net, but the one I followed was here: http://www.frank-buss.de/echoservlet/
Basically all this example does is takes a string, sends it to the servlet, and the servlet sends it back. I modified it to take a string as a parameter, query a database using that parameter, and return an arraylist to the applet. What ever you decide to return to the applet has to be serializable, otherwise it will not work properly.
I don't know if there is any more straight forward of a way to do it. IMHO, I would not want my applet to have direct access to my database anyway. I would want something on the server to make sure that the data was valid (not an attempt at SQL injection, etc), and just let the applet handle the display portion.