Before you start
This tutorial is recommended for XML developers interested in using JRuby on Rails, Java technology, and a database. It's also for those XML developers who wish to reduce their development time as they leverage the JRuby on Rails framework to use scaffolding without having to sacrifice the option of also using Java code.
This tutorial shows how to develop Ajax applications more efficiently with the help of JRuby on Rails and Java Server Pages (JSP) technologies hosted on a Java application server, IBM® WebSphere® Application Server Express. You'll use the framework set up by JRuby on Rails to give simple access, through XML, to your database of films, and you'll use JSP technology to add new films to and edit existing films in the database. In all, you'll learn to do the following:
- Install WebSphere Application Server Express
- Install and set up your first JRuby project
- Install the Goldspike plugin to your JRuby project for deployment to WebSphere Application Server Express
- Set up your JRuby project to use Derby as the database
- Get a working JRuby on Rails 2.0.2 project to properly send XML requests to the Ajax client
- Develop JSP files to handle adding and editing film entries by utilizing XML requests made by the Ajax client
- Develop an all-Ajax client to manage your films
- Deploy and test on WebSphere Application Server Express
To accomplish the above, you'll develop an example application for the online film industry where lovers of film will be able to manage, tag, and be redirected to their library of online videos. The Ajax application will receive communications in XML format from JRuby on Rails and send XML communications to JSP applications running a single Java application server instance.
For this tutorial you'll need the following downloads:
- WebSphere Application Server Express —Get a trial version of WebSphere Application Server Express from IBM (this tutorial uses V6.1). You'll use WebSphere Application Server as a full featured Java application server to host your JRuby on Rails Web application. However, please note that you can use any application server, such as Apache Tomcat or Apache Geronimo.
- JRuby —JRuby is a Java-based interpreter for Ruby, allowing deployment to Java application servers through the Goldspike plugin with full integration with Java libraries. This tutorial uses JRuby version 1.1.1, and Rails version 2.0.2. Rails will be downloaded and installed by RubyGem, which is part of the JRuby package.
- Database—The example application requires a database to store and retrieve film entries. This tutorial uses the version of Derby that comes with WebSphere Application Server Express, though you can use any version. Derby is nice because it's free and lightweight.
Knowledge of JSP and Rails technology is useful for this tutorial, but not required.

