tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <>
Subject Re: How send svg content to browser as response
Date Tue, 05 Sep 2006 10:16:12 GMT
prad wrote:
> Am processing some svg files on server side and after processing i need to
> send the svg as response...I set the mime type as "image/svg+xml"
> and  tried the below code

What has this servlet...
>  public void doGet(HttpServletRequest request,
>                       HttpServletResponse response)
> 		    throws ServletException, IOException{
> 	response.setContentType("text/html");
> 	PrintWriter out = response.getWriter();
> 	out.println("<html>");
> 	out.println("  <head>");
> 	out.println("    <title>SimpleServlet</title>");
> 	out.println("  </head>");
> 	out.println("  <body>");
> 	out.println("    Hello, World");
> 	out.println("  </body>");
> 	out.println("</html>");
>     } do with SVG?

> when i invoke this servlet's showing download dialog box and if
> press ok .....servletName.svg file gets downloads

The above servlet shows the behaviour you describe? I doubt that.

> Why its not directly displaying the contents in the browser...Any help
> plz..

You should first of all clarify what you're doing. I don't see any connection 
between the servlet code above and SVG.

Second: Is your browser capable of rendering SVG content / has a plugin 
installed for rendering SVG content?
work with your browser (assuming your Tomcat is installed on your local 
machine and listening on port 8080)?


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message