I have been playing with the new torquebox (JBOSS) app server and like what I see so far however the ruby apps seem to be segregated from the java webapps. It is like they run in silos as separate webapps and blending them is obscure although I read that sessions can be shared... which is cool.
I have a conventional web-app built in Java EE Servlet JSP style and I want to be able to use ruby as my presentation layer logic instead of the JSP that is being used.
I should be able to run ruby resource from a web request context. Much like apache mod_ruby kicks in to process rhtml... ( goal: get tomcat or JBoss to do this so trinidad or torquebox)
Example would be that I could replace HelloWorld.jsp ( that could call my java packages...) with HelloWorld.rhtml or .rb? and it could also call my java classes because it is JRuby...
As of now I can create RoR apps separate and sinatra but... I want ruby in the Java webapp not Java in the ruby webapp.
Does anyone know if what I am asking is currently possible with Torquebox or Trinidad?
You will still be stuck with JSP.
One option is to reuse JRuby's jar, but I doubt that will add much.
Not going to work. Ruby is not used for presentation. Rails framework allows
erb.htmlthat executes ruby, but that happens once when the page is loads. The rest is mostly Rails Helpers/JQuery for presentation.So, lets assume you got that working. What are you going to do with those ruby variables? I think it will lead to a dead-end, because there isn't much you can do with it with JSP.
The real question is what are you trying to do with Ruby that Java\JavaScript cannot do?
For presentation I recommend you look into things that will help you code tags in a JSP friendly way. Something like IceFaces. With what you are suggesting to accomplish, you are limited to Expression Language.