Servlet and serial port
We need to devel开发者_JAVA百科op centralized device management based on java. So Could you tell me how to write servlet to read serial port from client with usb token?
Not easily. In order to access resources on the client outside of the protected "sandbox" in the browser you will have to do it using a signed applet that communicates with the serial port and then back to the server (through some servlet interface like a web-service, for instance)
Alternatively, you can write a "real" client application that you would have to distribute and run on the client machine. This application would, in turn, communicate with the serial port and with the server through some communication method. This could also be a servlet-based communication like a web-service.
Point is, this has very little to do with servlets as a servlet executes on the server and has nothing to do with the client.
精彩评论