You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Vincent Hardy <vi...@sun.com> on 2001/06/21 12:04:35 UTC

Re: Streaming SVG back to IE browser

Brigette,

Before streaming the file back to the browser, did you make sure to 
set the http header's MIME type to be that of SVG? That might cause 
a problem.

Vincent.

> Brigette Muller wrote:
> 
> Hi all,
> 
> Has anyone else seen these symptons?
> I have a servlet that builds an SVG document using batik.
> If I write the SVG out as a file, and use the IE browser to open the
> file, the plugin works fine.
> If I stream the SVG back to the browser(as the entire response), I get
> a couple of plugin errors from IE5, (pop-up box with text "An error
> occured inside a plugin contained on this page" and an OK button), and
> the web server reports the following error:
> 
> [20/Jun/2001:10:32:51] failure (  217): Internal error: exception
> thrown from the servlet service function (uri=/Taipan):
> org.apache.batik.svggen.SVGGraphics2DIOException: Connection reset by
> peer, Stack: org.apache.batik.svggen.SVGGraphics2DIOException:
> Connection reset by peer
> 
>         at org.apache.batik.svggen.XmlWriter.writeXml(XmlWriter.java,
> Compiled Code)
>         at
> org.apache.batik.svggen.SVGGraphics2D.stream(SVGGraphics2D.java:341)
>         at
> org.apache.batik.svggen.SVGGraphics2D.stream(SVGGraphics2D.java:303)
>         at
> com.cox.taipan.TaipanServlet.OutputSVG(TaipanServlet.java:130)
>         at
> com.cox.taipan.TaipanServlet.RenderCoupon(TaipanServlet.java, Compiled
> Code)
>         at com.cox.taipan.TaipanServlet.doGet(TaipanServlet.java:90)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:701)
>         at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
>         at
> com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:472)
> 
> I'm guessing when the plugin reports the error, it resets the
> connection, refusing the remainder of the response.
> 
> From Netscape 4.08 it appears to work fine.
> 
> Here is the code snippet:
>         ServletOutputStream out = res.getOutputStream();  // servlet
> response
>         res.setContentType("image/svg+xml");
> 
> 
>         // Finally, stream out SVG to the standard output using UTF-8
>         // character to byte encoding
>         boolean useCSS = true; // we want to use CSS style attribute
>         Writer writeOut = new OutputStreamWriter(out, "UTF-8");
>         SVGGraphics2D svg2 = (SVGGraphics2D)(mg2);
>         svg2.stream(writeOut, useCSS);
> 
> Is this likely to be resolved by Adobe, or is it going to be an IE
> plugin implementation problem?
> How should I go about tracking this down?
> 
> tia
> Brigette



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