[英]Is there any way to interface html with RCP(E4) application using Javascript?
I have html application with javascript api and I want to communicate and control RCP application via this javascript. 我有带有javascript api的html应用程序,我想通过此javascript进行通信和控制RCP应用程序。 What is the best approach to deal with such case. 处理这种情况的最佳方法是什么?
HTML -> Javascript -> .... -> RCP (E4) application HTML-> Javascript-> ....-> RCP(E4)应用程序
More details added 添加了更多详细信息
Here I have an RCP calculator application. 在这里,我有一个RCP计算器应用程序。 Where User Interface and the Logic (Background function) is implemented. 实现用户界面和逻辑(背景功能)的位置。 Now the usecase is that user want to have Logic(background function) to be exposed to outside so that the HTML can be use javascript to make call to the logic (Background function). 现在,用例是用户希望将Logic(后台功能)暴露给外部,以便HTML可以使用JavaScript调用逻辑(Background函数)。 One problem is that the RCP application is already created and I dont want too much change to the RCP application. 一个问题是RCP应用程序已经创建,我不想对RCP应用程序进行太多更改。 Rather just expose the functionality to be called from javascript. 而是公开要从javascript调用的功能。
One option I figured out is that I can have 我想出的一个选择是我可以拥有
HTML >> Javascript >> webserive call <<->> webservice >> RCP application. HTML >> Javascript >> webserive调用<<->> webservice >> RCP应用程序。
Finally I resolved the problem with following approach: 最后,我通过以下方法解决了该问题:
HTML - Javascript <===> Java server (with Jetty/Jackson) HTML-Javascript <===> Java服务器(带有Jetty / Jackson)
Client side: 客户端:
Server side: listening to the port. 服务器端:监听端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.