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.
JSP is a view technology, not a full-stack framework like Rails. The Rails’ equivalent of JSP is probably ERB. In Java EE the Spring Framework lets you declare relationships between beans, but it's a lot more verbose than Rails.
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.
精彩评论