installation Jpetstore Detailed steps
1. Preparatory work
Jpetstore is an excellent example of Java EE Development and now lists its installation steps in Windows+tomcat+mysql,
Resin under the installation and Tomcat under almost the same! (I assume that your machine has been configured Jdk,tomcat,mysql, etc.), a brief introduction
My environment for reference (MYSQL:4.1.12-NT,TOMCAT:5.5.9,JDK:1.5.0_03), and don't forget Java connection MySQL database driver
Program my for: Mysql-connector-java-3.1.4-beta-bin.jar
2. Download Jpetstore
Open http://ibatis.apache.org/, click Downloads Binaries, Documentation, Source
or direct http://prdownloads.sourceforge.net/ibatisjpetstore/iBATIS_JPetStore-4.0.5.zip?download.
Jpetstore downloads are available on the page,
Current version number: 4.0.5
3. Installation
Decompression Ibatis_jpetstore-4.0.5.zip Get ibatis_jpetstore-4.0.5
Use the command prompt to enter the Ibatis_jpetstore-4.0.5/ddl/mysql directory, and then run
(Note: Add your MySQL path to the environment variable)
Mysql-uroot–p < Jpetstore-mysql-schema.sql
Mysql-uroot–p < Jpetstore-mysql-dataload.sql
Mysql-uroot–p < Jpetstore-mysql-create-user.sql
The above three files are to create database Jpetstore, import data, assign permissions.
Copy the Jpetstore.war under Ibatis_jpetstore-4.0.5/build/wars to the WebApps directory of Tomcat,
Then look at the WebApps directory, the Jpetstore folder appears,
Locate the database.properties under the Web-inf/classes/properties directory under this folder,
Replace the contents with the following:
####################################
# Database Connectivity Properties
####################################
Driver=com.mysql.jdbc.driver
Url=jdbc:mysql://localhost:3306/jpetstore
Username=jpetstore
password=ibatis9977
Restart Tomcat, in the IE Address bar input: http://localhost:8080/jpetstore/See the picture.
Click "Enter the Store" to see the parrot. Click again to test several connections, no problem, that good, configuration success ...