• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

image uploading in database

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any one send me how upload multiple image from one html form and jsp/servlet. i use db2 database and blob datatype.

its urgent please reply anyone..........

thank in advance.
 
Marshal
Posts: 80099
413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Never say anything is urgent. Question too difficult for "beginning". Moving thread to our databases forum.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. use Apache commons-upload jars

2. parse the request and get the FileItem (!isFormField())

3.get the InputStream from the FileItem

4.finally read and write the Image



5. and store the image location on server to the DB as a varchar(preferrable)

P.S. make the enctype of the jsp form attribute as "multipart/form-data"

Hope this helps
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
and Welcome to Javaranch Lalit Chattar
 
Lalit Chattar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

seetharaman venkatasamy wrote:1. use Apache commons-upload jars

2. parse the request and get the FileItem (!isFormField())

3.get the InputStream from the FileItem

4.finally read and write the Image



5. and store the image location on server to the DB as a varchar(preferrable)

Hope this helps



Thank you sir,

once i want to know that , can we send text value with multipart/form-data ...like profile...we can send image with text in he same form...and for above imformation give me some detail..
P.S. make the enctype of the jsp form attribute as "multipart/form-data"

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lalit Chattar wrote: can we send text value with multipart/form-data ...like profile...



Yes. you can...
 
Lalit Chattar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

seetharaman venkatasamy wrote:

Lalit Chattar wrote: can we send text value with multipart/form-data ...like profile...



Yes. you can...




How ? please give me example with jsp code and snapshot....


thank you
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please , Show Some Effort
 
author & internet detective
Posts: 42056
926
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Lalit Chattar wrote:How ? please give me example with jsp code and snapshot....


Seetharaman outlines the steps. Start by trying them and posting when you have a question. Were you able to pull in the recommended jar? etc.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic