从浏览器触发本地程序执行
首先也是最重要的:我知道这样做是不对的,甚至是好事,但我当前的客户不会屈服。所以这就是他的要求(这是针对防火墙后面的内部项目)。在网络报告中,我需要提供一个链接,该链接指向位于通用映射位置(网络文件服务器)上的可执行脚本。当用户单击它时,它预计将在本地客户端上运行,启动本地可执行文件,该可执行文件应预先安装在客户端的盒子上。它应该与操作系统(Windows 或 Linux)和所使用的浏览器无关。客户不介意单击愤怒的弹出警报,但他希望每个客户端浏览器(或至少 - 会话)执行一次。
问题:可信的 Java 小程序能够做到这一点吗?或者还有其他(更好、更简单)的方法可以达到同样的效果吗? ActiveX控件是没有问题的
First and foremost: I know it's not right or even good thing to do but my current customer will not cave in. So here's what he is asking for (this is for in-house-behind-a-firewall-etc project). In the web report I need to supply a link which points to the executable script that lives on the universally mapped location (network file server). When user clicks on it it is expected to run on the local client starting local executable which should be pre-installed on the client's box. It should be agnostic to OS (Windows or Linux) and the browser used. Customer doesn't mind to click on angry pop-up alerts but he wants to do it once per client browser (or at minimum - session).
QUESTION: Will trusted Java applet be able to do it? Or is the any other (better, simpler) ways of achieving the same? ActiveX control is out of question
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是我以前见过的黑客行为。在本地计算机上运行一个小型 Web 服务器,并让浏览器向本地 Web 服务器发送 http:// 请求。该服务器可以接受请求并对其进行解析,并可能启动脚本或运行文件。
不推荐它,但它是一个选择。其他用户需要考虑的问题 LogMeIn 如何在 Mac 和 Windows 上工作并获得文件系统控制?
This is a hack i've seen before. Have a small web-server run on the local computer, and have the browser send a http:// request to the local web-server. That server could take the request parse it, and potentially launch a script or run a file.
Wouldn't recommend it, but it is an option. Question for other users to consider How does LogMeIn work on both Mac and Windows, and get file system control?
所以我写了一个我称之为“Insane applet”的东西。步骤如下:
So I wrote something I called "Insane applet". Here are the steps:
关于 Java Applet,请阅读Applet 可以做什么和不能做什么。
一般来说,您需要一些服务器端逻辑来完成该任务。
Concering Java Applets, read What Applets Can and Cannot Do.
In general, you'll need some server side logic for that task.