tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prad <>
Subject How send svg content to browser as response
Date Tue, 05 Sep 2006 09:59:55 GMT


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

 public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
		    throws ServletException, IOException{

	PrintWriter out = response.getWriter();

	out.println("  <head>");
	out.println("    <title>SimpleServlet</title>");
	out.println("  </head>");
	out.println("  <body>");
	out.println("    Hello, World");
	out.println("  </body>");

when i invoke this servlet's showing download dialog box and if
press ok .....servletName.svg file gets downloads
Why its not directly displaying the contents in the browser...Any help plz..

Thanks & Regards
View this message in context:
Sent from the Tomcat - User forum at

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

View raw message