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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:55:06+00:00 2026-06-10T09:55:06+00:00

I have a gwt app that i debug on standard gwt port 8888 that

  • 0

I have a gwt app that i debug on standard gwt port 8888 that comunicate with a JAX-RS/Jersey/Glassfish service running on port 8080

This is the gwt code:

StringBuffer postData = new StringBuffer();

postData.append(URL.encode("username")).append("=").append(URL.encode(user));
postData.append("&");
postData.append(URL.encode("password")).append("=").append(URL.encode(password));

RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, "http://localhost:8888/gestdoc/resources/data/login");
builder.setHeader("Content-type", "application/x-www-form-urlencoded");
try {
    builder.sendRequest(postData.toString(), new RequestCallback() {

          public void onResponseReceived(Request request, Response response) 
          {
              String responseText = response.getText();
              String headers= response.getHeadersAsString();
              String statusText= response.getStatusText();
              int statusCode= response.getStatusCode();
              String toString= response.toString();


              System.out.println("responseText: "+responseText);
              System.out.println("headers: "+headers);
              System.out.println("statusTest: "+statusText);
              System.out.println("statusCode: "+statusCode);
              System.out.println("toString: "+toString);

              GestoreUtenze.this.cddoc.loginResponse(true);
          }


          public void onError(Request request, Throwable exception) {
             // exception handling
          }
        });
} catch (RequestException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

This is the output:

responseText: 
headers: 
statusTest: 
statusCode: 0
toString: com.google.gwt.http.client.Request$1@6c1a82

I have a java batch client with i have tested my Jersey services and are ok.

I have read many post and I suppose that I have a SAME ORIGIN POLICY problem.

I have tried many solutions:

  1. Run the browser where i debug my gwt app with non Same Origin Policy (chrome and firefox)
  2. Add the row in my gwt config file
  3. I have tried to set up a proxy without success. How can I do?

Can you help me to solve this problem please?

  • 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-06-10T09:55:08+00:00Added an answer on June 10, 2026 at 9:55 am

    The only usable way I found so fare was starting Google Chrome with

    --disable-web-security
    

    This disables the Same Origin Policy.

    You can do this in Win 7 by pressing [Strg + SHift + Right click] –> Properties and add –disable-web-security to the target property. However you should only use this property when debugging!

    FF and IE don’t seem to have a working way to bypass the SOP policy (couldn’t get any of the examples I found online to working and tried at least a week! :/)

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

Sidebar

Related Questions

I have a GWT application that accept these tokens: http://127.0.0.1:8888/app.html?gwt.codesvr=127.0.0.1:9997#user&someuser This will open up
I have a GWT app that makes an RPC call to a server to
I have written an GWT app and a static Intro page that introduces the
I have a gwt app that requires GWT Recaptcha for one of its part.
We have a GWT app that has multiple screens, based off of a menu.
We have a gwt app that uses jcifs to pull the user name from
We have a very large GWT project that results in a monolithic app about
I have a GWT app that have a HorizontalPanel that span across the width
I have a GWT app that I ported to GWT 2.4. Now I geta
I have some external Javascript files in my GWT app that I only want

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.