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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to