res.setContentType("text/xml"); res.setHeader("Cache-Control", "no-cache"); String responseString = ProductManager.getJSONProducts(); if(responseString != null) { res.getWriter().write(responseString); } else res.getWriter().write("fail");