5

I have a Ruby/Rails app, which is standard Rails CRUD, with some jQuery and no AJAX.

I have a Java web app with which I would like to integrate the Ruby/Rails app. The Rails app uses the same database as the Java web app and (safely) shares a few tables, and I will put the Rails app into a WAR file using a JRuby/Warbler and the deploy it to a separate Tomcat on the same physical server. The Java app runs on port 80, and the Rails app runs on port 3000 on the same server.

In the UI of the Java app, there is a place to put the new UI of the Ruby app. It is in the form of a few blank "div" tags on a few skeleton pages, and some accompanying screen real estate. I don't want to finagle with the Java UI code as much as possible, and get away with the minimum needed.

Is there a way to run the UI of the Ruby app as within two or three div's to which I have access? Ideally, can I point each div to load up one entry point in my Rails app (URL) and then have it load other pages as needed?

Do I have to worry about back buttons?

Are there any other questions I should ask to solve this problem?

Cheers, Jay

2
  • This may help - javaworld.com/javaworld/jw-07-2006/jw-0717-ruby.html Commented Sep 26, 2011 at 17:56
  • This article is pretty old, and its states the usual facts about Ruby and Java. Ihave not read anything about integrating RoR in Java there ... Commented Sep 26, 2011 at 18:04

1 Answer 1

2

iframes in the divs might get you there fastest if the Rails port is also visible to the outside. If it isn't, then perhaps it can be configured to work on some /subpath under port 80, though that might lead to a little bugfixing if your Rails code has assumptions about it being at /.

Sign up to request clarification or add additional context in comments.

1 Comment

I've never used iframes. I'll have a look at some tutorials. Thanks for the pointer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.