Connecting to a database over the internet


General J2EE: Connecting to a database over the internet

  1. Hello , Ok heres an interesting question - I would like to have an applet running on my browser which needs to connect to a central server over the internet, which in turn will need to connect to a database and query some results. These results will be stored as flat files within the server. At the moment, I have an URL that connects to the database via the internet and that is working. However I don't think my applet on my browser will be able to create a flat file on that server direclty. Could some one please tell me how to go about this problem? Shalini
  2. If your Applet originates from the same server you can write a file from the Applet.. Otherwise will have to write a component on the server which will create a file with the contents you specify. you should ofcourse be careful about authentication and authorizations. If this kind of service is exposed then it can be seriously dangerous. The service should properly authenticate the calling program and also allow only limited amount of data to be written.
  3. Hello, You can use "applet-servlet communication" to communicate with remote server and this servlet will inturn do all the database stuff for you. peace, Sanket Raut