Run JPETSTORE under Win2003 + Tomcat + MySQL

xiaoxiao2021-03-06  40

Run JPETSTORE under Win2003 Tomcat MySQL

I have long heard that JPETSTORE is an example of a very good J2EE development! I finally had time to configure it last week, I haven't had time to study, here to talk about how to run JPETStore under Win2003 Tomcat.

Here, I think your Java level is as bad as I, I used to do .Net, now Java has just begun to learn, about two weeks, if your Java is higher than me, then I don't want to see this article. I saw that I can only waste your time.

Step 1: Configure JDK and MySQL

I believe that you have already configured, what, yet, ^ - ^, is more stupid than me, ^ - ^! Then look at the "Building Java Development Environment" that I wrote, there is a detailed explanation of how to build a Java development environment!

It is best to copy a lib / Tools.jar under JDK under CommON / lib under Tomcat (it will be used in other projects later).

Step 2: Download JPETSTORE

On http://www.ibatis.com/jpetStore/jpetStore.html, you provide the download, which recommends that you download the latest version, but note that JDK and MySQL also use the corresponding version. Current version number:

4.0.5

Step 3: Create a JPETSTORE database

Put the Ibatis_JPETSTORE-

4.0.5

JPETSTORE-mysql-schema.sql under DDL / MYSQL,

JPETSTORE-MySQL-DATALOAD.SQL, JPETSTORE-MySQL-CREATE-User.sql three files copied to MySQL's bin directory, running these three files separately from the mysql command prompt:

MySQL -UROOT -P

MySQL -UROOT -P

Mysql -uroot -p

The above three files are the creation of database JPETSTORE, import data, allocation permissions. If you have the mysql management tool, you can also run these three files in your pressing management tool.

Step 4: Secretary JPETSTORE

Put the Ibatis_JPETSTORE-

4.0.5

/ Build / Wars Under the JPETStore.war copied to Tomcat's WebApps directory, then run Tomcat (http: // localhost: 8080). The JPETSTORE folder will appear in the WebApps directory, find the Database.properties under the web-inf / classess / property directory under this folder, replace the content inside to:

#################################################

# Database Connectivity Properties

#################################################

Driver = org.gjt.mm.mysql.driver

URL = JDBC: MySQL: // localhost: 3306 / JPETSTORE

UserName = jpetstore

Password = ibatis9977

转载请注明原文地址:https://www.9cbs.com/read-78684.html

New Post(0)