开发者

call ruby through jsp

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜