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 652429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:16:17+00:00 2026-05-13T22:16:17+00:00

I am trying out GWT in this ‘configuration’: 1) I have written a server

  • 0

I am trying out GWT in this ‘configuration’:

1) I have written a server backend in python which will produce json output (running at localhot:8094)

2) I have written a very simple GWT app that will use RequestBuilder to set GET to the python server (in development mode of the GWT eclipse plugin, it is accessible via http://127.0.0.1:8888/test.html)

The code is simply

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Test implements EntryPoint {
    /**
     * The message displayed to the user when the server cannot be reached or
     * returns an error.
     */

    private static final String SERVER_URL = "http://localhost:8094";
    private static final String SERVER_ERROR = "An error occurred while "
            + "attempting to contact the server. Please check your network "
            + "connection and try again.";

    /**
     * This is the entry point method.
     */
    public void onModuleLoad() {

        RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, SERVER_URL);
        try {
            requestBuilder.sendRequest(null, new Jazz10RequestCallback());
        } catch (RequestException e) {
            Window.alert("Failed to send the message: " 
                    + e.getMessage());
        }

    }

    class Jazz10RequestCallback implements RequestCallback{

        public void onError(Request request, Throwable exception) {
                // never reach here
        Window.alert("Failed to send the message: "
                    + exception.getMessage());

        }

        public void onResponseReceived(Request request, Response response) {
            // render output
            Window.alert(response.getText());

        }


    }
}

However the alert always comes from onResponseReceived and display nothing (empty string I suppose)

I can reach my python server alright and download the json via the browser. But I cannot see any request hitting the server from GWT.

I have ensured that “inherits name=’com.google.gwt.http.HTTP” is in the gwt.xml file

Questions are:

1) Is it same site policy restriction at work here? I would expect Exception (and hence the fail message), but it did not happen

2) If it is indeed the same site policy issue, what is the easiest way to deploy the GWT scripts from the python backend? The eclipse gwt plugin produces some artifact in the war subdirectory. Is it sufficient to copy these files to some static directory of my python backend?

  • 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-13T22:16:17+00:00Added an answer on May 13, 2026 at 10:16 pm

    1) Yes it is, while the host is the same, you are trying to access a different port – SOP doesn’t allow that. You’re probably getting JavaScript exceptions – check Firebug’s console or something similar.

    2) Follow the guide in the official docs. You don’t need a Java server – just one that can serve HTTP content (so, for example, Apache is fine). I have no experience with Python as the backend, but I’m sure there’s a solution for serving Python and HTTP.

    When using the -noserver flag, your
    external server is used by the GWT
    Hosted Mode browser to serve up both
    your dynamic content, and all static
    content (such as the GWT application’s
    host page, other HTML files, images,
    CSS, and so on.)

    The dynamic content in this case would be your Python scripts.

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

Sidebar

Related Questions

I'm trying to understand the RPC functionality which GWT uses, and have followed this
I am trying out WebIssues link text which allows for a client-server issue tracker.
I have written a game in PlayN, which has to communicate with a JavaEE-Server
I am trying out the Historical Debugger in VS2010 Beta 1. I have it
I have a Maven (3.0.3) / GWT (2.4) project. I'm trying to write some
I'm still pretty new to JSON and GWT and I'm trying to figure out
I am trying to integrate the code from this demo: http://code.google.com/p/gwt-spring-starter-app/ into my main
I am in the middle of developing my first GWT application which will consume
Trying out VS 2010, but still want to target .NET 3.5. Have all my
I'm trying out the gwt-comet extension here . I cant get any messages from

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.