tomcat-users mailing list archives

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

Hi,

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{

	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>");
    }

when i invoke this servlet .....it'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
Prad
-- 
View this message in context: http://www.nabble.com/How-send-svg-content-to-browser-as-response-tf2219904.html#a6149122
Sent from the Tomcat - User forum at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message