Sunday, September 12, 2010

Re: How to get HTTP Response headers?

I am getting an exception inside GWT:

code:

@Override
public void onResponseReceived( Request request,
Response response)
{
String toPop = "";
Header[] headers = response.getHeaders();
....

Exception:

java.lang.NullPointerException: null
at com.google.gwt.http.client.Request.getHeaders(Request.java:88)
at com.google.gwt.http.client.Request.access$0(Request.java:86)
at com.google.gwt.http.client.Request$1.getHeaders(Request.java:
53)
at com.***$2.onResponseReceived(***.java:153)

GWT version is 2.0.4

What is interesting, is that although I am calling
response.getHeaders(), the stack trace shows that Request.getHeaders()
is called. The exception is there in the compiled code as well. What
can be the cause? A broken GWT installation?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment