简体   繁体   English

如何从HTML / Java运行R并在Jboss / tomcat服务器上托管

[英]how to run R from HTML/Java and host on Jboss/tomcat server

I have Developed some google plot graphs and others graphs in R. the output here is plots with some interaction like mouse hover and update the plots for every 5 minutes (not JPEG). 我已经在R中开发了一些google绘图图和其他图表。这里的输出是具有某些交互作用的绘图,例如鼠标悬停并每5分钟更新一次绘图(不是JPEG)。 i want to run the r script dynamically and render it on HTML. 我想动态运行r脚本并将其呈现在HTML上。 previously i have hosted these on shiny-server using <iframe> to embed in HTML. 以前,我已经使用<iframe>将这些托管在Shiny-server上,以嵌入HTML。

now how can i host these on different server (HTML and r on same server). 现在我如何将它们托管在不同的服务器上(HTML和R在同一服务器上)。

  1. By redirecting iframe content to your shiny server : 通过将iframe内容重定向到您的闪亮服务器:

html & js like : html和js一样:

<iframe name="myFrame" ... />

js:  window.frames["iframetest"].location = "http://myshinyserver:..."

so two servers running ... 所以两台服务器正在运行...

  1. If you are using js chart libraries like ggvis, dygraphs ... and if you have to go with an app server, you should do some javascript to reproduce your graphs .... 如果您使用的是ggvis,dygraphs等js图表库,并且必须与应用服务器一起使用,则应该使用一些JavaScript来重现图形...。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM