views:

12

answers:

1

I'm looking for a way to call a COM port from a webpage.

I was thinking abut running a Java WebStart (or Flash?) program that opens a local web server that allows to interact with the COM port using JSONP.

Are there any show stopping security restrictions on the way that I don't know of? This should be possible:

  • use native libraries (Java COM bridge) from Java WS application
  • open a local port
  • access local port from javascript, likely using <script> tags
  • do all this without scaring users with "This website is trying to do something really nasty, get off as fast as you can" kind of messages :)

I've used a Java COM bridge before, so this shouldn't be the problem - at least as soon as I'm able to run native code.

So how would my JNLP file have to look like to get this working? Any alternatives to Java WS? Better install it as a daemon?

A: 

Impossible. This violates all sorts of very basic security principles, especially the part about do all this without scaring users with "This website is trying to do something really nasty, get off as fast as you can" kind of messages

This is EXACTLY what those messages are intended to prevent.

Jim Garrison
Those messages are trying to prevent abuse. That's not what I'm trying to do. I'm looking for the simplest solution to provide a valuable service. Certainly, this sort of things (especially accepting security warnings) require a considerable amount of trust from users, but so does every iPhone or Android app - still they get installed by millions of people.In your answer you mention "very basic security principles". Could you please name them?
sfussenegger