Created
September 4, 2019 21:36
-
-
Save parzibyte/c9d164903faff43a72edbfa17c403288 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ArrayList<ProductoParaVender> obtenerCarrito(HttpServletRequest request) { | |
ArrayList<ProductoParaVender> carrito = (ArrayList<ProductoParaVender>) request.getSession().getAttribute("carrito"); | |
if (carrito == null) { | |
carrito = new ArrayList<>(); | |
} | |
return carrito; | |
} | |
private void guardarCarrito(ArrayList<ProductoParaVender> carrito, HttpServletRequest request) { | |
request.getSession().setAttribute("carrito", carrito); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment