1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

JAVA MySQL connection - how to?

Discussion in 'Plesk for Linux - 8.x and Older' started by ramfade, May 1, 2006.

  1. ramfade

    ramfade Guest

    0
     
    I'm pretty much a newbie to JAVA, so thanks to anyone taking the time to read this.

    My system:
    FC2
    Plesk 7.5.4
    PHP 4.3.10-2.4
    MySQL 4.1.15-1.rhfc2.art
    Tomcat 4.1.24-full.2jpp
    HTTPD (Apache I assume...) 2.0.49-4

    What I've done:
    I was able to create my first usable JAVA application. It's purpose is to optimize (resize and compress) images for the web, upload to the server, and insert the image name and location into the database. It can do one, several, or an entire directory of images at once. It does this by posting an HTML multi-part form to a php script on the server, which in turn handles the files and runs the (MySQL) insert/update queries to update the database. The application can also read data very crudely by reading HTML output from the server. It works but it's cumbersome with the 'split' code I have to write.

    What I want to do:
    I want to improve on this and use JAVA for everything, especially for reading the data from the server - but I can't figure out where to start! The tutorials I find seem to do everything on one machine, and I don't really understand how much has already been done since Tomcat is already installed.

    The desired result:
    My goal is to have the application process all the images on the local machine, then upload to the server and insert into the database, among other database entry/edit tasks. I don't know if an applet would be better, I'm concerned with the size of the applet and how long it would take to load from the server. Or a servlet? I don't want to upload the images before optimizing for web, one of my clients thinks he needs a 10 megapixel image for anything!

    Or do I need a combination servlet / application for the database connection? I just don't know - my learning curves are usually flat longer than most I think.

    Any advice would be greatly appreciated!
     
Loading...