Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
venkat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
venkat
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic