开发者

call ruby through jsp

开发者 https://www.devze.com 2023-03-24 11:28 出处:网络
I have a ruby program on my machine. I want call it over the web. I have built a jsp page for this and have made a call:

I have a ruby program on my machine.

I want call it over the web.

I have built a jsp page for this and have made a call:

<%
    Runtime rt = Runtime.getRuntime();
    开发者_运维知识库Process proc = rt.exec("ruby somepathtoruby.rb");
%>

Doesn't seem to be working properly though.

Can anyone help me out here?


I believe you can capture the output of the Ruby program the same way you would capture the output of any other separate process you launch from Java

This page shows how to do it for a standalone Java application. You should be able to work it into a scriptlet in your JSP.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号