Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Efficient way of uploading a media file [img] to server using jsp view

 
Greenhorn
Posts: 19
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have heard storing images to database as BLOB is ridiculously slow and inefficient way of doing the uploading and retrieving task.
so the FileUpload method described in FAQs is a better option?right?
Can i find a better code/method than this.[i will eliminate those dirty scriptlets :)]
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regardless of whether you end up storing the file in a DB or in the file system, the upload process is pretty much the same.

And yes, a servlet should be used for the Java code, not a JSP.
 
Vivek K Jain
Greenhorn
Posts: 19
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sir i have understood the method explained in the FAQs and i am using fileupload method
below is the code:


now what i want is to store the path info to my database field so that later i can reference my db to retrieve the image from server ..how can i accomplish that?
please provide code snippets.
p.s. the above code is copied from a site and obviously looks ugly with all the scriptlet code.. i have improved it .
 
I don't like that guy. The tiny ad agrees with me.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic