Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Vivek K Jain
Greenhorn
Posts: 19
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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 :)]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic