阅读:51
UserListServlet:用于实现访问数据库,并将数据在页面显示的功能。
UserAddServlet:用于获取request数据,并将数据添加到ems数据库user表中。
UserDeleteServlet:用于通过员工id删除ems数据库中user表中id对应的数据。
<servlet>
<servlet-name>UserListServlet</servlet-name>
<servlet-class>EMS.UserListServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserDeleteServlet</servlet-name>
<servlet-class>EMS.UserDeleteServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>UserAddServlet</servlet-name>
<servlet-class>EMS.UserAddServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UserListServlet</servlet-name>
<url-pattern>/list</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserDeleteServlet</servlet-name>
<url-pattern>/delete</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>UserAddServlet</servlet-name>
<url-pattern>/addUser</url-pattern>
</servlet-mapping>