views:

29

answers:

2

In ruby on rails we can specify many Database relations line belongs_to, has_many, and this make coding a lot simpler.

But is there any such database relationship APIs that brings such coding ease to JSP.

I'm pretty new to JSP. But you can relate any code with ROR.

+2  A: 

JSP is a view technology, not a full-stack framework like Rails. The Rails’ equivalent of JSP is probably ERB. In JEE the Spring Framework lets you declare relationships between beans, but it's a lot more verbose than Rails.

John Topley
+2  A: 

Not to JSPs. JSPs are equivalent of rails views. You can do it in JPA by annotating Java Classes (rails model). See hibernate annotations documentation. Hibernate is a popular implementation of JPA in Java.

Chandra Patni