You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Atle Prange <at...@businesscape.no> on 2008/08/28 19:46:29 UTC

SVG, servlet filters and interception

Hi,

i want to use svg in my webapp, since it makes it easy to create images 
on the fly.

My plan is to make t5 pages that output svg instead of html, which 
should be easy.

But alas svg is not as straigh forward as it should. Little browser 
support might force me to convert the svg to images on the server before 
they are streamed to the client. That also means that the image is 
fetched in a different request than the request for the page.

I also have to convert the response (using batik) to a png. Any ideas 
where i put the interceptor to achieve this?

Is it possible to use "normal" pages in request for i.e. images this way?
(That way i could also define svg images as background in css)

any help is greatly appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: SVG, servlet filters and interception

Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
Hi,

Yes, it's possible to do this with regular pages. Simply return a 
StreamResponse with the right headers from onActivate. You'll have to 
handle caching etc. yourself, but it's not hard.

-Filip

On 2008-08-28 19:46, Atle Prange wrote:
> Hi,
> 
> i want to use svg in my webapp, since it makes it easy to create images 
> on the fly.
> 
> My plan is to make t5 pages that output svg instead of html, which 
> should be easy.
> 
> But alas svg is not as straigh forward as it should. Little browser 
> support might force me to convert the svg to images on the server before 
> they are streamed to the client. That also means that the image is 
> fetched in a different request than the request for the page.
> 
> I also have to convert the response (using batik) to a png. Any ideas 
> where i put the interceptor to achieve this?
> 
> Is it possible to use "normal" pages in request for i.e. images this way?
> (That way i could also define svg images as background in css)
> 
> any help is greatly appreciated.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org