Hibernate + JSP paging code developed with MyEclipse

Source: Internet
Author: User
Tags mysql mysql database

After downloading, import the project to MyEclipse, and then modify the database connection parameters to test. I'm using the MySQL database. JSP is because the Hibernate can match various frameworks, so in the code I have tried to separate the page and the background directly variable coupling.

Some of the code shows:

Related SQL:

CREATE TABLE ' user ' (
' id ' int () not NULL,
' username ' varchar ' is not NULL,
' password ' varchar not N ull,
' age ' int,
PRIMARY KEY (' id ')
) Engine=myisam DEFAULT CHARSET=GBK;
--JDBC Driver Name:com.mysql.jdbc.Driver
--jdbc Driver url:jdbc:mysql://hostname/dbname?

USEUNICODE=TRUE&CHARACTERENCODING=GBK
INSERT INTO user values (1, ' Chinese ', ' Beansoft ', 1);
Insert into user values (2, ' beansoft ', ' Beansoft ', 2);
Insert into user values (3, ' John ', ' Beansoft ', 3);
Insert into user values (4, ' Dick ', ' Beansoft ', 4);
Insert into user values (5, ' Harry ', ' Beansoft ', 5);
Insert into user values (6, ' Ma Liu ', ' Beansoft ', 6);
Insert into user values (7, ' Black Seven ', ' Beansoft ', 7);
Insert into user values (8, ' Laba ', ' Beansoft ', 8);
Insert into user values (9, ' Land Nine ', ' Beansoft ', 9);
Insert into user values (10, ' Mao 18 ', ' Beansoft ', 10);

Related Article

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.