File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 60990
    
  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 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Efficient way of uploading a media file [img] to server using jsp view