Struts 2 + Spring 2 + JPA + AJAX(转自官方文档)
<div class="wiki-content">On this tutorial we will demonstrate how to setup Struts 2 in Eclipse, and make it work with Spring, Java Persistence API (using Hibernate) and Struts 2 Ajax tags.NOTE: Following this tutorial verbatim will require use of a Struts 2 deployment greater than 2.0.3
Prerequisites
[*]Tomcat 5.5http://cwiki.apache.org/confluence/images/icons/linkext7.gif
[*]Eclipsehttp://cwiki.apache.org/confluence/images/icons/linkext7.gif
[*]MySql Serverhttp://cwiki.apache.org/confluence/images/icons/linkext7.gif
Tomcat
Install Tomcat before going forward. See Tomcat's installation guide if you have any problem installing it.
MySql
Install and configure MySql. Create a database named "quickstart" and run the script below to create the "Person" table. Later, on applicationContext.xml, we'll use 'root' as the user name and password for the database, remember to replace those values with the right ones for your database.
<div class="code"><div class="codeContent">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;
页:
[1]