This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes vvvv urgent - Scanning and saving documents into oracle db with Twain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "vvvv urgent - Scanning and saving documents into oracle db with Twain " Watch "vvvv urgent - Scanning and saving documents into oracle db with Twain " New topic
Author

vvvv urgent - Scanning and saving documents into oracle db with Twain

venkat
Greenhorn

Joined: Jan 03, 2002
Posts: 3
i am writing an application that calls twain application to scan and bring the images. on the client side, i am using chestysoft's csXimage to display/preview the image.
i am facing problem in passing this image to a servlet and there upon save the image into a table.
i have worked out sample application and tried saving a blob into oracle 9i .
questions:
in which format and how do i pass the image to the servlet
guess accordingly i hav eto write the servlet
any sample applications written would be welcome.
this is really urgent and ment for a project.
thanks and regards
venkat
Mike Nightsky
Ranch Hand

Joined: Aug 18, 2001
Posts: 48
You could do it with a mulitpart request ( com.oreilly.servlets [used] or apache fileupload [no experience] package recommended) and save the file on the server, than open the file and read it with a stream in, put it into the blob and you are there. this is the easy way.
The other is to do the work that is encapsulated into the package by hand and get the stream directly without the "shortcut" through the filesystem.
[ January 10, 2005: Message edited by: Mike Nightsky ]

Win the opportunity to make money on the Internet<br /><a href="http://sweeps.sitesell.com/minirich.html" target="_blank" rel="nofollow">http://sweeps.sitesell.com/minirich.html</a>
venkat
Greenhorn

Joined: Jan 03, 2002
Posts: 3
thanks mike ,
actually i have the image as a binary stream in an array in javascript.
how do i transfer this variable, that holds array of the image to my servlet.
later in the servlet i plan to convert it to blob and put in db.
thanks
venkat
[ January 10, 2005: Message edited by: venkataraman ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

"venkataraman"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: vvvv urgent - Scanning and saving documents into oracle db with Twain