On Jun 4, 2005, at 11:34 PM, Patrick Casey wrote:
Forserving 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 pageswith (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 pagethe URL doesn't change and the IE treat it like svg. So I activate thepage, 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 stillrendered. Is my approach correct or should I implement it in a differentway? 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]
