FileDocCategorySizeDatePackage
SpecialSetter.javaAPI DocExample628Thu Apr 05 20:19:26 BST 2001None

SpecialSetter

public class SpecialSetter extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)

    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();

    ServletContext context = getServletContext();
    context.setAttribute("com.costena.special.burrito", "Pollo Adobado");
    context.setAttribute("com.costena.special.day", new Date());

    out.println("The burrito special has been set.");