Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    HTTP Header

    Hi,
    This may not be your issue. But I am trying to get the some data from a forwarding page. I need to get to the HttpRequest object to get to some header information. What object or what do I need to do on my EntryPoint to get this information.

    Thanks,

    I found this snippet of code. Should it retain the sender header information?

    public class GetExample implements EntryPoint {
    public static final int STATUS_CODE_OK = 200;

    public static void doGet(String url) {
    RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);

    try {
    Request response = builder.sendRequest(null, new RequestCallback() {
    public void onError(Request request, Throwable exception) {
    // Code omitted for clarity
    }

    public void onResponseReceived(Request request, Response response) {
    // Code omitted for clarity
    }
    });
    } catch (RequestException e) {
    // Code omitted for clarity
    }
    }

    public void onModuleLoad() {
    doGet("/");
    }
    }
    Last edited by ttran; 13 Jan 2011, 09:36.

    #2
    Looks like the code here just redirect you. Another word, it wipe out what's is been passed by the source.

    It there a handler or something I can extends from and grab the header from the source calls?

    Thanks,

    Comment


      #3
      What specific HTTP request? The one for the .html file that loads the application? If so, you'll need to either turn the .html file into a .jsp or write a filter servlet that intercepts that URL, and capture the header that way, possible storing it in the session for later retrieval via an RPC.

      Comment


        #4
        I got to the jsp.
        Last edited by ttran; 14 Jan 2011, 07:38.

        Comment

        Working...
        X