Hi,
I would like to know two things:
1�)First, is it possible for a servlet to produce directly SVG picture on the screen?
I've tried to write the following code for the PrintWriter:
PrintWriter out = res.getWriter();
res.setContentType("image/svg-xml; charset=iso-8859-1");
But it doesn't seem to work.
2�)For the moment, I've written a new file svg, like this, via JAXP:
Source input = new DOMSource(doc);
idTransform.transform(input,new StreamResult(out));
idTransform.transform(input,new StreamResult(new
FileOutputStream("c:/tomcat/webapps/tuto/WEB-INF/classes/sortie.svg")));
But I've indicated an absolute adress for the file. I know it's possible to indicate
juste a reltive URL, relative to the web application.
I've looked in the Servlet.API, and it seems to be done via the object ServletContext
returned by rhe method getServletContext() of ServletConfig.
But I don't know exactly how it works.
I would be very grateful for any assistance.
Th anks in advance,
CYril.
_______________________________
Cyril Vidal
Email: [EMAIL PROTECTED]
Web: http://www.planetexml.com