• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

JAVA MySQL connection - how to?

R

ramfade

Guest
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!
 
Back
Top