Requirements:
- do a landing page, to achieve login , user name and password are admin, login success, with session record user name , logon failure, please indicate the reason for failure.
- make a simple management system, implement registration, modify, query, delete the function of the staff, registration content such as, the course requirements can be multiple selection, separated by commas, saved to the table. The table himself built a temporary table under INTF, such as INTF. temp_001
- use the session to do a simple interception function, if the JSP page found not logged in, then jump to the login page
- Register add.jsp
- Modify Edit.jsp
- Query querylist.jsp
- Login.html
- When deleting records, using Ajax processing, when the database deleted successfully,JS Dynamically delete the table that row , prompting jquery of the Remove () .
- after adding the success,JS dynamically adds a row after the table, prompting jquery for append or HTML ().
- Pop-up box processing.
- Click Add or edit to popup a small box processing, add or modify the success, close the small window, and then refresh the table
Implementation process
I. Understanding programming tools and environments
Tools: Tomcat (server), MyEclipse (development tools)
Environment configuration:
Tomcat Download Install OK
MyEclipse configuration: 1. Configuring the Tomcat Location
2. Configuring the JDK
3. Configuring Tomcat for Project Startup
(There are tutorials on all three steps, as well as flags to configure success: Run as can select just-configured tomcat)
Create a new project (understand the overall structure of the project)
1, new "Web Serveice Project" after the new successful, you can run as to see the effect. Enter http://localhost:8080/ServletTest/login.jsp Servlettest in the browser to replace with your project name.
Null pointer exception:
First Java Web project: Employee Management System