protected void doGet (HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
		HttpSession session = req.getSession(true);
		User user = (User)session.getAttribute("currentSessionUser");
		
		String currCat = (String)req.getParameter("category");
		String filter = (String)req.getParameter("search");
		try {
			long catID;
			// If there's no category filter, search for all products
			if (currCat == null) {
				currCat = "*";
			}
			//else 
				//catID = CategoryDAO.find(currCat);
			
			// List all the products, if there's a category filter, only list products
			// that are in that category
			List<Product> products = ProductDAO.list(currCat);
			req.setAttribute("productList", products);
			
			// Set's the filter from the search bar
			if ( filter == null ) {
				req.setAttribute("filter", "");
			}
			else {
				req.setAttribute("filter", filter.trim());
			}
			if (user != null && user.isOwner()) 
				req.getRequestDispatcher("productsOwner.jsp").forward(req,res);
			else
				req.getRequestDispatcher("productsBrowsing.jsp").forward(req,res);
		} catch (SQLException e) {
			String error = "An error occured while trying display the products.";
			req.setAttribute("error", error);
			req.getRequestDispatcher("productsOwnerConfirm.jsp").forward(req, res);
		}
		
	}