Task queue java
        Posted  
        
            by user268515
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user268515
        
        
        
        Published on 2010-06-12T12:21:36Z
        Indexed on 
            2010/06/12
            12:32 UTC
        
        
        Read the original article
        Hit count: 572
        
Hi i'm new to Task queue java API i tried a simple Example for it. My idea is to redirect the queue file to a servlet and to print some statement in the servlet.But it doesn't work. i mapped web.xml and used default queue I didnt get any Error but the file is not redirected to servlet . this is the codee i followed
taskq.java
           public class taskq extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)throwsIOException {
    Queue queue = QueueFactory.getDefaultQueue();
    System.out.println("taskqueue");
    queue.add(url("/worker"));
}
    worker.java
         public class worker extends HttpServlet {
private static final long serialVersionUID = 1L;
public String s;
public void doGet(HttpServletRequest req, HttpServletResponse resp)throws IOException {
    String s="crimsom";
    System.out.println(s);
}
 }
Please Help me on this issue. Regards Sharun.
© Stack Overflow or respective owner