By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

Communication between Java applet and javascript

P: n/a
Hello all,

let's me explains my long problem:

I'm doing an intranet with a media part. So im must be able to upload files on
a ftp server AND have a record of informations about this file and meta date in
a MySQL database, shown in a php page.

So the first thing i was doing was:

1/ * A HTML Form, with a <input type="file"> which was uploading the file to
the web server. And then, in the next action-php-page, using ftp functions from
php to upload to the ftp server. But this make upload the file 2 times, which
slow, and the user can't do anythig except waiting in front of a blanck loading
page.

=> no way

(BTW, the site admin refuse that the ftp server and the web server to be the
same computer)
So i tried something else:

2/ * A HTML form, the user enter meta data about the media, click next, and
then, a php page which loads a java applet an pass informations to it (by param
tags).
The applet have a browse button, and a go button, which start the transfert
(JDK 1.4.1) trough the URLConnection. The file is uploaded once, and there is a
progress bar, which is wonderful.

But now, i need the src_file information wich is the java applet. So i have two
options:

A/ I make a post to the webserver from the applet. But i'm using session
identification (needed for tracing users actions) and i'm gonna use SSL in less
than one month, so i think it would be complicated.

B/ I export the information from the java applet to javascript, and then to
HTML hidden field, so that the user can submit the full-hidden-filled form. But
i can't make LiveConnect works.

i'm under Mac OS X 10.2 (jaguar) so i need to make work LiveConnect on both
Safari 1.0 (v85.6), mozilla 1.5, and Mac OS IE (5.2).

After few hours on google, searching for informations and already working
liveconnect example, i'm in big doubt...

Is there any other way??

Thx for helping a desesperate developper...

--
david

Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ike
http://www.rgagnon.com/howto.html

"david" <pa*********@server.com> wrote in message
news:br**********@news-reader1.wanadoo.fr...
Hello all,

let's me explains my long problem:

I'm doing an intranet with a media part. So im must be able to upload files on a ftp server AND have a record of informations about this file and meta date in a MySQL database, shown in a php page.

So the first thing i was doing was:

1/ * A HTML Form, with a <input type="file"> which was uploading the file to the web server. And then, in the next action-php-page, using ftp functions from php to upload to the ftp server. But this make upload the file 2 times, which slow, and the user can't do anythig except waiting in front of a blanck loading page.

=> no way

(BTW, the site admin refuse that the ftp server and the web server to be the same computer)
So i tried something else:

2/ * A HTML form, the user enter meta data about the media, click next, and then, a php page which loads a java applet an pass informations to it (by param tags).
The applet have a browse button, and a go button, which start the transfert (JDK 1.4.1) trough the URLConnection. The file is uploaded once, and there is a progress bar, which is wonderful.

But now, i need the src_file information wich is the java applet. So i have two options:

A/ I make a post to the webserver from the applet. But i'm using session
identification (needed for tracing users actions) and i'm gonna use SSL in less than one month, so i think it would be complicated.

B/ I export the information from the java applet to javascript, and then to HTML hidden field, so that the user can submit the full-hidden-filled form. But i can't make LiveConnect works.

i'm under Mac OS X 10.2 (jaguar) so i need to make work LiveConnect on both Safari 1.0 (v85.6), mozilla 1.5, and Mac OS IE (5.2).

After few hours on google, searching for informations and already working
liveconnect example, i'm in big doubt...

Is there any other way??

Thx for helping a desesperate developper...

--
david

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.