Installation Jpetstore Detailed steps

Source: Internet
Author: User
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 ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.