Here's the "recipe":
import java.ingredients.*;
import java.ingredients.flour.*;
import java.ingredients.brownSugar.*;
import java.ingredients.egg.*;
import java.ingredients.butter.*;
import java.ingredients.vanillaEssence.*;
import java.ingredients.bakingPowder.*;
import java.ingredients.milk.*;
import java.ingredients.raisinOrChocolateChip.*;
public class createCookie extends BakingServlet
{
public void doBake(BakingServletRequest request, BakingServletResponse response)
throws OverheatException
{
String data = request.getParameter("ingredients");
Cookie cookie = new Cookie("MyCookies", data);
response.bakeCookie(cookie);
response.setContentTime("12min");
PrintWriter pw = response.getWriter();
pw.println("MyCookie has been baked...");
pw.println("Serve with a glass of milk...");
pw.close();
}
}
Enjoy! xx
No comments:
Post a Comment