Sunday, August 30, 2009

Struts 2 + Spring 2 + JPA + AJAX

For those who wish to have an Eclipse Project for "quickstart" project of Struts 2 + Spring 2 + JPA + AJAX, here is the link.

quickstart.zip(Filefactory.com)

I have resolved most of the dependencies using following versions
1. Struts 2.0.11. I was not able to get Struts 2.1 jars working with this project
2. Spring 2.0.8
3. Hibernate 3
4. To resolve "org.hibernate.persistence" dependency, hibernate-all.jar is required
5. Jboss archive jar dependency resolved by jboss-common-core.jar from JBoss dist.

Tested with Tomcat 6, MySQL 5.1. You will have to crate a database "quickstart" and the person table. DB settings can be changed in datasource config in applicationContext.xml.

CREATE TABLE 'quickstart'.'Person' ( 'id' INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
'firstName' VARCHAR(45) NOT NULL, 'lastName' VARCHAR(45) NOT NULL, PRIMARY KEY('id'))ENGINE = InnoDB;

Let me know your comments/feedback.

HTH,
byteB