On Jun 4, 2005, at 11:34 PM, Patrick Casey wrote:
For
serving SVG I need to switch contenttype from text/html to image/ svg+xml.
I
achieved this by implementing a SVGWriter which sets the contenttype
accordingly.

The Internet Explorer ignores the contenttype, so I have to name the pages
with (pagename).svg.

You can use a servlet filter to map .svg extensions into the Tapestry URL (urlrewrite from dev.java.net would do the trick).

Unrelated: There is a .application property you can set for the default template extension (see the docs).

After I throw a PageRedirectException to a html page
the URL doesn't change and the IE treat it like svg. So I activate the
page,
but this doesn't work either.

Neither of those techniques does a client-side redirect. You need to throw a RedirectException to force a true redirect.

Validation fails but the svg file is still
rendered. Is my approach correct or should I implement it in a different
way? Why is the svg file rendered even if validation fails?

You are in charge of flow control completely with validation in Tapestry. You will need to implement two paths - one for failure that goes (back?) to the appropriate page, and one for success that redirects to the SVG.

    Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to