Your web application requires logic to remember items that a user placed into a shopping cart.
Which two mechanisms should you use to associate that information with the user? (Choose two.)
Your web application requires logic to remember items that a user placed into a shopping cart.
Which two mechanisms should you use to associate that information with the user? (Choose two.)
To remember items that a user placed into a shopping cart across multiple interactions, you can use HttpSession objects and a database. HttpSession objects are designed to store user-specific data on the server across multiple requests within a session. Using a database allows you to persist this information across sessions and provide a robust, long-term storage solution. While ServletContext can store global web application data, it is not suitable for user-specific data, and HttpServletResponse is used for writing HTTP responses back to the client, not storing session data.
Answer B, C. ServletResponse not useful. Database not needed.
I think answers are BC, because a data base is not in the Web App as a resource.
Answer is BD
Answer is C,D
The answers should be C (HttpSession objects) and D (a database).