Hello there
I'm programming an GWT app on a Apache Tomcat Server, which means that
I use Java for server-side programming. So far so good.
Now I'm wondering how I can transfer the data I gained on the server-
side with Java to the GWT.
For example, I have got a list of image paths like
www.example.com/test.jpg
www.example.com/test2.jpg
...
I want to use these images in the application, as in I have to
transfer the data (urls) from server-side to client-side.
But in what format can I return the data? I mean an ArrayList would be
convenient, or a JSON String. I tried both, but both didn't work out
for me...
Have you got some advice how I can make that happen?
Or how more specifically how I can solve my problem above?
Problem:
I tried to get the hang of JSON.. I couldn't figure out how one can
actually form a JSON String (tried to do so with gson).
My situation in pseudo-code looks like this:
for() {
toMyJSONString.add(url[i]);
}
return MyJSONString;
Goal would be to have MyJSONString in the JSON format like:
{
url1: "www.example.com/test.jpg",
...
}
Would be great if you could shed some light... I'm not used to Java
yet... but I'm raring to learn! :)
In case im not clear enough, please let me know!
Thanks a bunch!
Best regards,
Benjamin
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.