FileDocCategorySizeDatePackage
ProductServlet.javaAPI DocExample977Wed Apr 05 20:05:26 BST 2006com.oreilly.ajax.servlet

ProductServlet

public class ProductServlet extends HttpServlet

Fields Summary
private static final long
serialVersionUID
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)


          
  

    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");