• 大小: 525KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-22
  • 语言: Java
  • 标签: jsp  servlet  

资源简介

采用tomcat作为服务器,mysql为数据库,可作为课程设计

资源截图

代码片段和文件信息

package a.servlet;
import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
import a.factory.*;
import a.vo.*;
public class AddServlet extends HttpServlet{
public void doGet(HttpServletRequest req HttpServletResponse resp) throws ServletExceptionIOException{
req.setCharacterEncoding(“GBK“);
User use = new User() ;
use.setId(req.getParameter(“id“)) ;
use.setName(req.getParameter(“name“)) ;
use.setPass(req.getParameter(“password“)) ;
try{
boolean flag = UserDAOFactory.getIUserDAOInstance().doJud(use.getId());
if(flag){
req.getRequestDispatcher(“adduser_failure.jsp“).forward(reqresp);
}else{
UserDAOFactory.getIUserDAOInstance().doAdd(use);
req.getRequestDispatcher(“adduser_success.jsp“).forward(reqresp);
}
}catch(Exception e){
e.printStackTrace();
}
}
public void doPost(HttpServletRequest req HttpServletResponse resp) throws ServletExceptionIOException{
this.doGet(reqresp);
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        663  2012-10-28 15:35  833\jsp\Java_servlet\adduser.jsp

     文件        173  2012-10-27 22:33  833\jsp\Java_servlet\adduser_failure.jsp

     文件        266  2012-10-27 22:30  833\jsp\Java_servlet\adduser_success.jsp

     文件        766  2012-11-08 13:49  833\jsp\Java_servlet\alter.jsp

     文件        672  2012-10-28 15:38  833\jsp\Java_servlet\login.jsp

     文件        171  2012-10-27 22:46  833\jsp\Java_servlet\login_failure.html

     文件        387  2012-11-08 13:51  833\jsp\Java_servlet\login_success.jsp

     文件        209  2012-10-31 17:01  833\jsp\Java_servlet\success.jsp

     文件     540852  2007-10-04 23:11  833\mysql-connector-java-5.0.8-bin.jar

     文件       2355  2012-11-08 14:04  833\WEB-INF\classes\a\dao\impl\UserDAOImpl.class

     文件        373  2012-11-08 14:04  833\WEB-INF\classes\a\dao\IUserDAO.class

     文件       1722  2012-11-08 14:04  833\WEB-INF\classes\a\dao\proxy\IUserDAOProxy.class

     文件       1033  2012-11-08 14:04  833\WEB-INF\classes\a\dbc\DatabaseConnection.class

     文件        385  2012-11-08 14:04  833\WEB-INF\classes\a\factory\UserDAOFactory.class

     文件       1567  2012-10-27 22:56  833\WEB-INF\classes\a\servlet\AddServlet.class

     文件       1410  2012-11-08 14:04  833\WEB-INF\classes\a\servlet\AltServlet.class

     文件       1511  2012-11-08 14:04  833\WEB-INF\classes\a\servlet\DelServlet.class

     文件       1579  2012-10-29 21:14  833\WEB-INF\classes\a\servlet\InsertUserServlet.class

     文件       1530  2012-10-29 21:14  833\WEB-INF\classes\a\servlet\LoginCheckServlet.class

     文件       1549  2012-11-08 14:04  833\WEB-INF\classes\a\servlet\LoginServlet.class

     文件        661  2012-11-08 14:04  833\WEB-INF\classes\a\vo\User.class

     文件       1006  2012-10-27 22:56  833\WEB-INF\classes\AddServlet.java

     文件        890  2012-11-08 13:36  833\WEB-INF\classes\AltServlet.java

     文件        762  2012-10-17 12:34  833\WEB-INF\classes\DatabaseConnection.java

     文件        885  2012-11-08 14:04  833\WEB-INF\classes\DelServlet.java

     文件        360  2012-11-08 12:24  833\WEB-INF\classes\IUserDAO.java

     文件       1503  2012-11-08 12:36  833\WEB-INF\classes\IUserDAOProxy.java

     文件        948  2012-11-08 13:43  833\WEB-INF\classes\LoginServlet.java

     文件        435  2012-10-17 13:40  833\WEB-INF\classes\User.java

     文件        210  2012-10-17 13:00  833\WEB-INF\classes\UserDAOFactory.java

............此处省略19个文件信息

评论

共有 条评论