Use a separate page to generate the images and generate Links to the page.
For the page, onActivate(String image) returns the StreamResponse.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755p5715782.html
Sent from the Tap
that works, thanks.
the component approach generates different urls for the same photo depending
on which page the component is used, maybe some other approach that can
create a unique url regardless pages?
http://localhost:8080/test123.memimg:image/image1
http://localhost:8080/testxyz.memimg:ima
If you want the image name as a parameter
Link getImage(String imageName) {
return resources.createEventLink("Image", imageName);
}
private StreamResponse onImage(String imageName) {
return new ImageResponse(imageName);
}
If you
here is the code I'm trying to come out, ImageResponse derived from
StreamResponse, the issue now is, the img url is always the same for every
photo:
http://localhost:8080/test123.memimg:image
tml:
< img t:type="MemImg" image_name='literal:image1' / >
java:
@SupportsInformalParameters
public cl
it's not static, but some small photos that are kept just for a short time.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/StreamResponse-for-small-cacheable-images-tp5715755p5715762.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
If the images are static and you can build them into the jar or war, I'd
avoid using StreamResponse and instead use the "asset:" or "context:"
binding prefixes.
For jpegs on the classpath
${asset:path/to/image.jpg}
For jpegs in the web context
${context:path/to/image.jpg
http://tapestry.apache
On Thu, 23 Aug 2012 11:04:07 -0300, Angelo C.
wrote:
Hi,
Hi!
I have some very small jpegs that are kept in the file system, what is
the right method to render them to client and it can also be cached in
the
browser? I'm looking at StreamResponse, is it the right way to go?
Yes.
--