From: Manuel on 30 Apr 2010 05:37 Hello. In an applet: �How can I do to, by clicking a button, download a file? �And if the file is in a resource? Thanks.
From: Andrew Thompson on 30 Apr 2010 12:34 On Apr 30, 7:37 pm, Manuel <nos...(a)nospam.com> wrote: >..In an applet: Sand-boxed or trusted? Deployed using standard HTML or JNLP? > ¿How can I do to, by clicking a button, download a file? Is it the 'clicking a button' or the 'download a file' that you are having trouble with? At the same site or a different site? > ¿And if the file is in a resource? You mean if it is in one of the Jars added the run-time class-path of the applet using the 'archive' attribute? That makes it simpler. BTW - never ignore the possibility of putting a simple HTML link to the (un-Jar'd) resource on the server, and ensure the server has the correct mime-type configured for that file type. Most browser/OS combos. will know exactly what to do with/how to handle most file types that might be downloaded. BTW (2) - What is the type of files you want to offer the user on the 'click of a button'? Images? Music? Viruses? .. -- Andrew T. pscode.org
From: Manuel on 30 Apr 2010 13:58 Andrew Thompson a formul� ce viernes : > On Apr 30, 7:37�pm, Manuel <nos...(a)nospam.com> wrote: >> ..In an applet: > > Sand-boxed or trusted? Deployed using standard HTML or JNLP? > >> �How can I do to, by clicking a button, download a file? > > Is it the 'clicking a button' or the 'download a file' > that you are having trouble with? > > At the same site or a different site? > >> �And if the file is in a resource? > > You mean if it is in one of the Jars added the run-time > class-path of the applet using the 'archive' attribute? > That makes it simpler. > > BTW - never ignore the possibility of putting a simple > HTML link to the (un-Jar'd) resource on the server, and > ensure the server has the correct mime-type configured > for that file type. Most browser/OS combos. will know > exactly what to do with/how to handle most file types > that might be downloaded. > > BTW (2) - What is the type of files you want to offer > the user on the 'click of a button'? Images? Music? > Viruses? .. I want to make a signing applet to remote control the pcs of my customers. I make it in Delphi, and in c# than a desktop application but now I want to make if it is posible like a Java Applet, I'm new in java. The soft puts, if not exists, winvnc.exe and the .ini directly in the home folder of the PC and with 2 buttons "Connect", "Disconnect" my customer controls my connection to the PC, because I execute and control the process. My first problem is than I don't know how to put a file that is my server in System.getProperty("user.home") when my user click the connect button. Can you help me ?
From: Roedy Green on 9 May 2010 13:00 On Fri, 30 Apr 2010 11:37:52 +0200, Manuel <nospam(a)nospam.com> wrote, quoted or indirectly quoted someone who said : >Hello. >In an applet: >�How can I do to, by clicking a button, download a file? >�And if the file is in a resource? >Thanks. See http://mindprod.com/products1.html#HTTP for sample application see http://mindprod.com/products1.html#SUBMITTER You must sign the Applet unless the file in on the server in the file tree of the Applet jar. See http://mindprod.com/jgloss/resource.html for how to read a resource. E.g. http://mindprod.com/jgloss/image.html for how to read a resource image. -- Roedy Green Canadian Mind Products http://mindprod.com What is the point of a surveillance camera with insufficient resolution to identify culprits?
|
Pages: 1 Prev: Basic Question about Loggers, Parent Loggers, and Levels Next: Spam on Usenet groups |