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