I have a Java web application hosted on Weblogic server. I am going to use a passport scanner(hardware) to scan a document so that when browser reach to the page, it able to display whatever text it scanned to prevent human error.
first of all, there is some dll, .jar that scanner is provided as well as C# sample code,VB.net sample code and Java sample code to interact with Scanner
What I understand is
I cannot use the jar to trigger the Scanner on Java because it is in Server side.
Solutions that i think of
standalone application running on background on client machine to interact with Scanner which
- it will store the scanned text to a text file
- xhtml will get the text from the text file
standalone application running on background on client machine to interact with Scanner which
- it will display the scanned text directly on text field on browser. It is something like getElementByID and set method.
do it on Front end (xhtml) to call the jar on client machine.
What I have tried
I tried to call the jar from browser using JavaScript. Browser shows cross-origin security policy error and i have google it that browser will not allow to access client directory which will cause security breach.
My Question
I want to know is that my provided solution is workable? Is there others good solutions?
Thank you.