• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet + Database

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm writing a program that could be good as an applet except for one problem. The problem is that the program needs to read data from a large (6-10 MByte) file. The data file can't be broken up, either. The ideal solution is to keep the data file on the web host and use a servlet-applet design, so that the applet can get only the little parts it needs from the file by telling the servlet what to get. The problem is that I was wanting to put this on my university web page, which doesn't support servlets or JSP's--they told me "no active content", but I'm wondering if maybe there is some clever way around this, aside from expecting the users to download the datafiles to their machines every time that they want to run the applet (since there are about a dozen 10 mb files, this would be crazy).
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you don't want the user to download the file, let the applet do it. As long as the file is on the same server as the applet, it can get at it through HTTP (or the classloader/resource mechanism).
I don't think you can avoid downloading the complete file, though.
 
Christopher Arthur
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could I set it up some way so that once the user downloads the file, if they revisit the web page, they won't have to redownload the database? It's been a while since I coded an applet, so I can't remember what the security limitations are. Is it so that the less technical but trusting users could be prompted for allowing privleges, or is it something that has to be set by an administrator or in the browser?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the DB contents don't change, the users could just be told to keep the file on their machine, couldn't they? And yes, the applet needs to be signed if it wants to read the file off the local file system. Details on how to handle that are on this wiki page.
 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic