Link to home
Start Free TrialLog in
Avatar of Triggered
Triggered

asked on

Uploading images using JSP.

Hi,

Im wondering is it posible to have have a user of a website upload images to a website using JSP.

e.g im creating an ecommerce site where i want to allow users to upload images of the items they wish sell

I had originally tended implementing this in ASP but due to external circumanstances ive been unable to go down that road.

Sample code and links would be of great help.

Thanks,
Triggered
ASKER CERTIFIED SOLUTION
Avatar of Nick_72
Nick_72

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Triggered
Triggered

ASKER

so once i download this JAR file, integrete into my IDE, add in the neccessary code (above,with a bit of testing) my website users should be able to upload images of items they are selling... thats excellent ,i always thought java would be very unforgiving due to security restrictions when it came to uploading files across the net

Thanks a mill,
Triggered
I take it aswell i can specify my folder to upload the images to eg have all images of items for sale placed in c:\blah\blah\mySite\ItemsForSaleImages  .... 1 more thing whats the best/easiest method to handling the storing of the images ... im thinking of using a database table with column indicating the path of the uploaded file OR else actually storing the images as BLOPs
You might be thinking of applets. The security restrictions are solid when it comes to that technique...

In my application I went for the first option you mentioned, namely storing the images in a folder and saving the paths to the database. I believe that is the easiest way :)

Let me know if you need more help with this.
Sorry for not getting back to you sooner Nick 72,

im wondering how would I go about storing the images in a folder and saving the paths to the database , ie the same as before (allowing a user to upload images of items they wish to sell)....ive got the uploading using your code working (your help was much appreciated :-) ...starting to get the hang of this java), i just like to know how would get the other method of huploading working (using a folder and storing the paths to the images on the folder on a table in my database )