Calling a POST controller method from within a JSP page

Hello,

I am running a rails app inside a tomcat server. I wrote a rails
restful controller and now looking for a way to invoke its methods
from within a jsp page. I was hoping there is a jruby-rack way of
invoking it but I can’t find a way of making a POST request.

Is jruby-rack my answer here? or should I be calling ruby model
methods directly instead?

Thanks.

Hi,

On Thu, Jan 26, 2012 at 2:28 PM, Samer A. [email protected]
wrote:

I am running a rails app inside a tomcat server. I wrote a rails
restful controller and now looking for a way to invoke its methods
from within a jsp page. I was hoping there is a jruby-rack way of
invoking it but I can’t find a way of making a POST request.

My attempt,

, might help you.
But, that attempt didn’t work for all cases. The reason is mainly
because Rails’ paths are created based on database schema. I couldn’t
figure out how I got all paths programmatically. There should be the
way but undocumented.

Hope that helps.
-Yoko