My platform is: Eclipse3.2 MyEclipse5.5 Tomcat5.5 MySql5.0
First step: Create a database:
It's no hard work, just use the script below to make it OK.
CREATE DATABASE page;
use page;
CREATETABLE `product` (
`id` varchar(11) NOTNULL,
`sortid` varchar(11) NOTNULL,
`name` varchar(50) NOTNULL,
`price` doubleNOTNULL,
`saleprice` doubleNOTNULL,
`descript` text NOTNULL,
`contents` text NOTNULL,
`saledate` varchar(255) NOTNULL,
`salecount` int(11) defaultNULL,
`image` text,
PRIMARYKEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Step Two: Create a project
Create a project, project name "Strutspage", import Struts1.2, struts package defaults, reference MySQL driver, if there is no driver, please go to http://download.csdn.net/source/400716 this download.
The following settings Web.xml and struts-config.xml configuration files, I think directly copy my good.