How do I get an input stream from an injected asset on my page? The activation context is which image to use, so I want to stream one asset or the other.
@Inject @Path( "context:/images/myimage1.png") private Asset myImageLogo1; @Inject @Path( "context:/images/myimage2.png") private Asset myImageLogo2; StreamResponse onActivate( String logoName ) { if ( "logo1".equals( imageName ) { return new StreamResponse() { public String getContentType() { return "image/png"; } public InputStream getStream() throws IOException { return ????? stream from myImageLogo1 ???? } public void prepareResponse( Response response ) { // Nothing needed. } }; } else { // use image 2 } } -- View this message in context: http://old.nabble.com/Return-image-asset-from-onActivate-tp27283549p27283549.html Sent from the Tapestry - User mailing list archive at Nabble.com.