package com.servlets;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;


public class BlogoutServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    
    public BlogoutServlet() {
        super();
        
    }
    
    
    protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    	response.setContentType("text/html;charset=UTF-8");
    	try(PrintWriter out = response.getWriter()){
    		try {
    			
    			
    			HttpSession httpSession = request.getSession();
    			httpSession.removeAttribute("current-seller");
    			response.sendRedirect("bussiness.jsp");
    			
    			}catch(Exception e) {
    			
    		}
    		
    	}
    		
    		
    		
    	}
    	
    	

	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		processRequest(request,response);
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		processRequest(request,response);
	}

}
