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

  • SEARCH
  • Home
  • 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 3842064
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:44:25+00:00 2026-05-19T15:44:25+00:00

I’m currently working on a SalesForce.com tutorial entitled Force.com for Google App Engine for

  • 0

I’m currently working on a SalesForce.com tutorial entitled Force.com for Google App Engine for Java: Getting Started

I’ve installed the Google Eclipse Plugin, downloaded the libraries, and entered the “Hello World App” (as seen on the tutorial page):

package com.force;
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.*;
import java.util.logging.*;

import com.sforce.ws.*;
import com.sforce.soap.partner.*;
import com.sforce.soap.partner.sobject.SObject;


@SuppressWarnings("serial")
public class HelloWorldServlet extends HttpServlet {
    private static final Logger log = Logger.getLogger(HelloWorldServlet.class.getName());

    private String username = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    private String password = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    private PartnerConnection connection;

    public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        resp.setContentType("text/html");
        resp.getWriter().println("Hello, world. this is a test2");

        PrintWriter t = resp.getWriter();
        getConnection( t, req);
        if ( connection == null ) { return; }

        QueryResult result = null;

        try {

            result = connection.query(  "select id, name, phone from Account order by LastModifiedDate desc limit 10 ");

        } catch (ConnectionException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        for (SObject account : result.getRecords()) {
             t.println("<li>"+ (String)account.getField("Name") + "</li>");
        }
    }

    void getConnection(PrintWriter out, HttpServletRequest req)  { 

        try { 
            // build up a ConnectorConfig from a sid
            String sessionid = req.getParameter("sid");
            String serverurl = req.getParameter("srv");

            if ( connection == null ) { 

               out.println("<p>new connection needed</p>");
               // login to the Force.com Platform
               ConnectorConfig config = new ConnectorConfig();
               if ( sessionid != null && serverurl != null) {
                   config.setServiceEndpoint(serverurl);
                   config.setSessionId(sessionid);
                   config.setManualLogin(false);
                   out.println("using session from query string");
               }   else { 
                   config.setUsername(username);
                   config.setPassword(password);
               }
               connection = Connector.newConnection(config);
               out.println( connection.getConfig().getSessionId() );
               out.println( connection.getConfig().getServiceEndpoint() );
           } else { 
               out.println("<p> reuse existing connection"); 
               out.println( connection.getConfig().getSessionId() );
           }
           log.warning("Connection SID " +connection.getConfig().getSessionId());

        } catch ( ConnectionException ce) {
            log.warning("ConnectionException " +ce.getMessage());

            out.println( ce.getMessage() + " s " + ce.getClass() );

        }

    }
}

When I run the application as a “Web Application” I get the following in the console:

Initializing AppEngine server
Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Successfully processed D:\education\java\HelloWorldOriginal\war\WEB-INF/appengine-web.xml
Successfully processed D:\education\java\HelloWorldOriginal\war\WEB-INF/web.xml
The server is running at http://localhost:8888/
Warning: default mime table not found: C:\devtool\Java\jre6\lib\content-types.properties

When I try to visit http://localhost:8080/ , I see:

Oops! Google Chrome could not connect to localhost:8080
Did you mean: localhost-­8080.­com
Additional suggestions:
Try reloading: localhost:­8080
Search on Google:

Google Chrome Help - Why am I seeing this page?
©2011 Google - Google Home

But when I visit http://localhost:8888/ , I get:

Web Application Starter Project

Please enter your name:
    Send

(Which, also isn’t the desired or expected outcome.)

What is this content-type.properties that I’m missing and how can I fix it? Or is that just a symptom of a greater problem?

  • 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-19T15:44:26+00:00Added an answer on May 19, 2026 at 3:44 pm

    Have you checked that your web.xml directs requests for / to the appropriate handler class? Just writing the class isn’t enough – you have to make sure that incoming requests are directed to it.

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

Sidebar

Related Questions

No related questions found

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.