On 03/10/2011 04:21 PM, Thiago H. de Paula Figueiredo wrote:
On Thu, 10 Mar 2011 17:49:14 -0300, Rich M <rich...@moremagic.com> wrote:
Okay, that makes sense. Is there a way to use the StreamResponse
instead of the URL then to display an image in the browser?
Unless you want to generate one of that data URLs
(http://en.wikipedia.org/wiki/Data_URI_scheme), you'll need to
generate an URL for it just like it was described in the thread you
linked. StreamResponses don't have URLs by themselves.
My application will be able to more reliably serve the images via the
StreamResponse rather than the URL
Why?
Primarily because I can't think of a reasonable way to build a URL to
the file that could actually be served. I wish I was more knowledgeable
about servlets and such, but if my application is running from a WAR,
how would I get any files into that context? In development I use maven
directory structure and the mvn jetty:run command to execute. From here
I know I can place files relatively from my context in
src/main/webapp/<where-ever> and serve it as an Asset. However, when I
have to deploy it into production and run it as a WAR in stand-alone
Jetty, I think this approach is no longer viable.
so I'd like to consider that approach, or at least know if how to do
it for curiosity sake.
Wise words. :)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org