res.setContentType("text/xml");
res.setHeader("Cache-Control", "no-cache");
User user = (User) req.getSession().getAttribute("user");
if (user != null)
{
ShoppingCartManager.emptyShoppingCart(user);
String responseString = ShoppingCartManager
.getJSONShoppingCart(user);
res.getWriter().write(responseString);
}
else
res.getWriter().write("fail");