wood burning stoves 2.0*
The moose likes JSP and the fly likes Efficient way of uploading a media file [img] to server using jsp view Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Efficient way of uploading a media file [img] to server using jsp view" Watch "Efficient way of uploading a media file [img] to server using jsp view" New topic
Author

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

Vivek K Jain
Greenhorn

Joined: Mar 17, 2013
Posts: 19

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

Joined: Jan 10, 2002
Posts: 60808
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vivek K Jain
Greenhorn

Joined: Mar 17, 2013
Posts: 19

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 .
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Efficient way of uploading a media file [img] to server using jsp view
 
Similar Threads
Request dispatcher doesn't redirect to the jsp page
This Weeks GiveAway:
Notifiying EJB when database table changes
in jsp i want touse java script variable value
how can i get a value in java script function from database