Hi all,

I have some difficulties to find out how to read a text file with gwt 2.2
...
The only thing i have found about it is anyone saying on a forum that it can
be done using RequestBuilder, but his example doesnt want to compile, cant
fin Method.GET ...


new RequestBuilder(Method.GET, "path/to/file.txt").sendRequest("", new
RequestCallback() {
>   @Override
>   public void onResponseReceived(Request req, Response resp) {
>     String text = resp.getText();
>     // do stuff with the text
>   }
>
>   @Override
>   public void onError(Request res, Throwable throwable) {
>     // handle errors
>   }
> });
>
>
So, i have two case where i need to read a file :
1) The file is on server side and a client has to read content
2) The user selects a file on his local machine and the client has to read
it

It sounds a bit more complicated than in nomal Java :p
Any advice ?

Thanks for your attention,
Regards,
Harold

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to