BVB Source Codes

The Android source client + server register online booking system Show UserDeleteServlet.java Source code

Return Download The Android source client + server register online booking system: download UserDeleteServlet.java Source code - Download The Android source client + server register online booking system Source code - Type:.java
  1. package com.hospital.servlet.userservlet;
  2.  
  3. import java.io.IOException;
  4. import java.io.PrintWriter;
  5.  
  6. import javax.servlet.ServletException;
  7. import javax.servlet.http.HttpServlet;
  8. import javax.servlet.http.HttpServletRequest;
  9. import javax.servlet.http.HttpServletResponse;
  10.  
  11. import com.hospital.daoimpl.UserDaoImpl;
  12.  
  13. public class UserDeleteServlet extends HttpServlet {
  14.  
  15.         public UserDeleteServlet() {
  16.                 super();
  17.         }
  18.  
  19.         public void destroy() {
  20.                 super.destroy(); // Just puts "destroy" string in log
  21.                 // Put your code here
  22.         }
  23.  
  24.         public void doGet(HttpServletRequest request, HttpServletResponse response)
  25.                         throws ServletException, IOException {
  26.  
  27.                 response.setContentType("text/html");
  28.                 PrintWriter out = response.getWriter();
  29.                
  30.                 int userId = Integer.parseInt(request.getParameter("userId"));
  31.                 UserDaoImpl userDaoImpl = new UserDaoImpl();
  32.                 userDaoImpl.delete(userId);
  33.         }
  34.  
  35.         public void init() throws ServletException {
  36.                 // Put your code here
  37.         }
  38.  
  39.         @Override
  40.         protected void doPost(HttpServletRequest request, HttpServletResponse response)
  41.                         throws ServletException, IOException {
  42.                 response.setContentType("text/html");
  43.                 PrintWriter out = response.getWriter();
  44.                
  45.                 int userId = Integer.parseInt(request.getParameter("userId"));
  46.                 UserDaoImpl userDaoImpl = new UserDaoImpl();
  47.                 userDaoImpl.delete(userId);
  48.         }
  49.  
  50. }
downloadUserDeleteServlet.java Source code - Download The Android source client + server register online booking system Source code
Related Source Codes/Software:
CoordinatorTabLayout cool components - CoordinatorTabLayout is combination of a custom co... 2017-02-26
grace - Graceful restart & zero downtime deploy for Go... 2017-02-26
tpm - Tmux Plugin Manager 2017-02-26
Win32-OpenSSH - Win32 port of OpenSSH 2017-02-26
goconvey - Go testing in the browser. Integrates with `go tes... 2017-02-26
The Android source gorgeous sunny weather weather forecast program source code - This item is a weather forecast program source cod... 2017-02-26
The Android source of guangdong ocean university library Android client program source code - This project is a guangdong ocean university libra... 2017-02-26
The Android source code imitation sing part layout interface project - This project is a modeled after sing the UI projec... 2017-02-27
The Android source CSDN information client try simple project - This item is a CSDN practice version information o... 2017-02-27
Android jingdong financial front page head effect - Principle is very simple, is through listening Scr... 2017-02-27
flakes - Flakes is an Admin Template Framework. A combinati... 2017-04-15
capstone - Capstone disassembly/disassembler framework: Core ... 2017-04-15
nginx-resources - A collection of resources covering Nginx, Nginx + ... 2017-04-15
utron - A lightweight MVC framework for Go(Golang) 2017-04-15
cfssl - CFSSL: Cloudflare's PKI and TLS toolkit ... 2017-04-15
HandBrake - HandBrake's main development repository ... 2017-04-15
Awesome-Networking - A curated list of awesome networking libraries, re... 2017-04-15
react-sortable-hoc - A set of higher-order components to turn any list ... 2017-04-15
jugglingdb - Multi-database ORM for nodejs: redis, mongodb, mys... 2017-04-15
waybackpack - Download the entire Wayback Machine archive for a ... 2017-04-15

 Back to top