protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException, SQLException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
  HttpSession session=request.getSession(true);
        Connection con=(Connection)Konekcija.konekcija();
         String []g = request.getParameterValues("check");
       String dugme=request.getParameter("dodaj");
           
            if(dugme.equalsIgnoreCase("odobri")){
           
             if (g != null) {
                for (int i = 0; i < g.length; i++) {
                     
              String naziv=g[i];
              
              
              
              Statement st=null;
              Statement st1=null;
              ResultSet rs1=null;
              try{
              session.setAttribute("naziv", naziv);
              
              st1=con.createStatement();
               st1.executeUpdate("Delete from trebovanje  where Naziv='"+naziv+"'");;
               
               RequestDispatcher dis1=request.getRequestDispatcher("formaZaDodavanjeArtikla.jsp");
               dis1.forward(request, response);
               
             
               
              
               
               
             
               
              
              }catch(SQLException e){
              
              }
             }
            }
           
           
 
   
  
    }else if(dugme.equalsIgnoreCase("odbij")){
     if (g != null) {
                for (int i = 0; i < g.length; i++) {
                     
              String naziv=g[i];
              
              Statement st3=null;
              try{
                  st3=con.createStatement();
                  st3.executeUpdate("Delete from trebovanje  where Naziv='"+naziv+"'");
                  RequestDispatcher dis=request.getRequestDispatcher("logovanjeSefaMagacina.jsp");
                  dis.forward(request, response);
              }catch(SQLException e){}
                }
                }
    }
    }