Applications can get complex as they get larger. It is fine to just do a few templates with inline queries, but as your applications increase in size, developers realize that keeping business logic in the correct place becomes harder.
Instead of talking of displaying our tables in a web page, why not talk about discreet objects and how they are related to each other? Once we have done that, we will want the objects to somehow persist for longer than the request that created them, so why not store them in a database? This is incredibly simple in Railo Server, as we shall see.
Railo Server allows you to do this with the use of the Hibernate Persistence from JBoss (http://www.hibernate.org/), but without you having to do a lot of the configuration that is normally required to use it in Java applications.