Monday, August 26, 2013

Re: load image file from directory outside WAR folder and display in gwt app.

The solution for that would be no different fro GWT than for any other client-side approach: write a servlet that can locate the file and stream the image contents to the response output stream. The file path/name info can either be a parameter, or, with some clever servlet mapping, part of the url used to invoke the servlet.

A search like "servlet stream image" yields a lot of possible approaches.

On Monday, August 26, 2013 6:41:26 AM UTC-4, Jostein wrote:
Hi all,
I have the following situation:

I have a directory, /home/images, on my Ubuntu server containing images. The images are uploaded from an Android application by a servlet.
I am running Tomcat7 on this server and the image directory is owned by the Tomcat7 user so it should be accessable from tomcat.

Now I want to view the images in my GWT application running on the same tomcat server. I have not been able to find a working example for this.

I hope someone point mee to the right solution here. I would like to see example including both server- and clien side code.

Thanks in advance

Jostein

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment