This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
From a web page? If there's a way to do it (I really have no idea) it'd have to be an applet; and probably a signed one. Technologies such as servlets and JSP run on the server and have no access to the client machine or its peripherals.
Or you might consider a desktop application that can be loaded via Java Web Start.