Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6202157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:41:00+00:00 2026-05-24T04:41:00+00:00

I am working with google app engine task queue. Its my first time. I

  • 0

I am working with google app engine task queue. Its my first time. I found a tutorial but having some problems. Following are two servlets i am using to check task queue:

 public class GAEJSignupSubscriberServlet extends HttpServlet {

   private static final Logger _logger = Logger.getLogger(GAEJSignupSubscriberServlet.class.getName());


public void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws ServletException, IOException {


    resp.setContentType("text/plain");
    resp.getWriter().println("Hello, world");

    String strCallResult = "";
    resp.setContentType("text/plain");
    try {
        String strEmailId = req.getParameter("emailid");
        _logger.info("Got a Signup Subscriber Request for Email ID : " + strEmailId);
        //
        // PUT YOUR TASK CODE HERE
        //
        if(strEmailId.equals("mh")){
        System.out.println("email-id" + strEmailId);
        }
        strCallResult = "SUCCESS: Subscriber Signup";
        _logger.info(strCallResult);
        resp.getWriter().println(strCallResult);
        }
        catch (Exception ex) {
        strCallResult = "FAIL: Subscriber Signup : " + ex.getMessage();
        _logger.info(strCallResult);
        resp.getWriter().println(strCallResult);
        }
}
@Override
    public void doPost(HttpServletRequest req, HttpServletResponse resp)
       throws ServletException, IOException {
          doGet(req, resp);
    }

 }

second servlet is:

  public class GAEJCreateTaskServlet extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
    this.doPost(req, resp);
}

public void doGet(HttpServletRequest req, HttpServletResponse resp)
        throws IOException {
    resp.setContentType("text/plain");
    resp.getWriter().println("Hello, world");

    String strCallResult = "";
    resp.setContentType("text/plain");
    try {
        //Extract out the To, Subject and Body of the Email to be sent
        String strEmailId = req.getParameter("emailid");

        //Do validations here. Only basic ones i.e. cannot be null/empty

        if (strEmailId == null) throw new Exception("Email Id field cannot be empty.");

        //Trim the stuff
        strEmailId = strEmailId.trim();
        if (strEmailId.length() == 0) throw new Exception("Email Id field cannot be empty.");
        //Queue queue = QueueFactory.getDefaultQueue();
        Queue queue = QueueFactory.getQueue("subscription-queue");
        queue.add(TaskOptions.Builder.withUrl("/gaejsignupsubscriber").param("emailid",strEmailId));
        strCallResult = "Successfully created a Task in the Queue";
        resp.getWriter().println(strCallResult);
        }
        catch (Exception ex) {
        strCallResult = "Fail: " + ex.getMessage();
        resp.getWriter().println(strCallResult);
        }
}
    @Override
    public void doPost(HttpServletRequest req, HttpServletResponse resp)
       throws ServletException, IOException {
          doGet(req, resp);
    }

 }

I am invoking GAEJCreateTaskServlet with this URL:

 http://localhost:8080/gaejcreatetask?emailid=romin@rocketmail.com

now problem is when i invoke this url i see the output that task is created but in development console i can not see any task in the queue. If i remove doPost function from both servlets then i see the task in the queue but when i run it nothing happens and tasks remains there. Why is it happening so and how can i solve this problem. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:41:01+00:00Added an answer on May 24, 2026 at 4:41 am

    Most likely you can’t see the task because it has already executed. Check your logs (the console in development, or the logging page on the admin console in production) to see what exception is being thrown by your task handler (if any) and fix it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a Google App Engine program that will require some basic spell
I've been working with Google App Engine and I'm running into some slow performance
I am working on a Google app engine project where I have saved some
I am working on a django- Google app engine project. A user inserts some
I am working on a Google App Engine application, and have been facing some
I'm working with Google App Engine and Facebook Connect. I have found Facebook Python
im working on some basic python stuff within the google app engine and I
I'm currently working on a SalesForce.com tutorial entitled Force.com for Google App Engine for
Background: I working on an application on Google App Engine. Its been going really
I am using google app engine. Before everything was working fine but now when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.