wood burning stoves 2.0*
The moose likes Servlets and the fly likes Using hashtable for multi part form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Using hashtable for multi part form " Watch "Using hashtable for multi part form " New topic
Author

Using hashtable for multi part form

Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
Hey guys do you have any examples that uses hash table for multi part form to insert data into database(My sql server).


Thanks





[Thumbnail for insert.jpg]

Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
What do you mean by 'uses a HashTable' ?


JDBCSupport - An easy to use, light-weight JDBC framework -
Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
Oh it is because my form is using multipart from that enbales me to upload/Insert image into my database.

Howerver, I also need to insert other details into my database such as productid, ProdName, unitprice.....

Hence, My tutor suggested using hashtable.

However, I do not understnd.

Do you guys have any samples regarding on this?

I read some of the post that is something similar but still do not get it.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61762
    
  67

A HashTable seems to make as much sense as a fork.

What are you really trying to accomplish?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
Oh I am trying to insert image as well as details into the database.
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
I don't know how a Hashtable (by the way, don't use Hashtable, it's an old implementation, use HashMap instead) is going to help you.

What you need to do is read the binary data and then send it to your database.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Using hashtable for multi part form