package cs263.cs263;

import static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.taskqueue.Queue;
import com.google.appengine.api.taskqueue.QueueFactory;

public class Enqueue extends HttpServlet {
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		String key = request.getParameter("key");

		// Add the task to the default queue.
		Queue queue = QueueFactory.getDefaultQueue();
		queue.add(withUrl("/worker").param("key", key));

		response.sendRedirect("/assign1/index.jsp");
	}
}

@@ -1,811 +1 @@
-package cs263.cs263;%0A%0Aimport static com.google.appengine.api.taskqueue.TaskOptions.Builder.withUrl;%0A%0Aimport java.io.IOException;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport com.google.appengine.api.taskqueue.Queue;%0Aimport com.google.appengine.api.taskqueue.QueueFactory;%0A%0Apublic class Enqueue extends HttpServlet %7B%0A%09protected void doPost(HttpServletRequest request,%0A%09%09%09HttpServletResponse response) throws ServletException, IOException %7B%0A%09%09String key = request.getParameter(%22key%22);%0A%0A%09%09// Add the task to the default queue.%0A%09%09Queue queue = QueueFactory.getDefaultQueue();%0A%09%09queue.add(withUrl(%22/worker%22).param(%22key%22, key));%0A%0A%09%09response.sendRedirect(%22/assign1/index.jsp%22);%0A%09%7D%0A%7D
 %0A

Update Enqueue.java