Web project design and development--dbhelper3

Source: Internet
Author: User

The content of this study is based on the dbhelper of the data in the database to increase the deletion and check

The specific contents are:

I. Preparation of procedures

1. Create a project--mangage
2. Create five packages in src directory, respectively Dao,dbhelper,entity,servlet,tools
3. In writing Testdao test files, Userdao, DBHelper, user entity classes, servlet classes Userservlet, and search on-line code that leverages the reflection mechanism of Java
4. Create JSP file user.jsp,show.jsp,updata.jsp for database data additions and deletions
5. Add a link configuration file
Second, the operation of the program
Direct run as runs on MyEclipse Tomcat
Third, debugging code changes
When the code error and the page display is not correct: first write the code of the M layer should not immediately write the other layer of code, should first Test Userdao, in the Testdao directly to the Userdao program test, test success after the next code

The servlet error should be created at the start of the click on the run as on server, to show that another page is correct, or comment out the code directly write out the output statement

Display errors can be modified according to the page prompt error.
Experience: This dbhelper test due to the operation of more, you can step by step, a code to write, you should test the current code, and do not wait until all the code is written after the test, if there is an error, do not know where error. In the process of writing code, can not write, but must understand its principle; you can discuss it with your classmates.

Web project design and development--dbhelper3

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.