×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Nhan Tran
Added: Aug 7, 2021 1:07 PM
Views: 3652
Tags: no tags
  1.   private static final String MAIN_PAGE = "page";
  2.     static Logger log = Logger.getLogger(MY_SERVLET.class);
  3.  
  4.     /**
  5.      *
  6.      * @param request
  7.      * @param response
  8.      * @throws ServletException
  9.      * @throws IOException
  10.      */
  11.     protected void processRequest(HttpServletRequest request, HttpServletResponse response)
  12.             throws ServletException, IOException {
  13.         response.setContentType("text/html;charset=UTF-8");
  14.         String url = MAIN_PAGE;
  15.         String username = request.getParameter("txtUsername");
  16.         String password = request.getParameter("txtPassword");
  17.         try {
  18.            
  19.         } catch (Exception ex) {
  20.             log.warn(ex.getClass().getSimpleName() + ": " + ex.getMessage());
  21.         } finally {
  22.               request.getRequestDispatcher(url).forward(request, response);
  23.         }
  24.     }