Javascript solutions are only going to work in a certain webbrowser developed by a team in Redmond, which supports ActiveX. But still then, the client may need to confirm security alerts and/or configure the security settings to let it get to work.
Java solutions are only going to work in flavour of a signed
applet or web start application which you embed in your JSP. Both are able to run entirely at the client side. You can't do anything from in the server side.