Hi, I'm trying to put a graphic into an Velocity Template (vm). The problem is that the servelt generated graphic should not be physically saved to an temporary folder on the server. It's an encoded jpeg stored in a bytearray. When I use the servlet path at an 'img src'-tag the graphic is shown. But I don't have this option here. I already tried to add the bytearray to the context by using the method put() but then I only get the hash of the bytearray (because of the toString() method I guess).
Here's my code: -------------------------------------------------- public void perform(Context context, HttpServletRequest request, HttpServletResponse response, Properties initProps, Properties sessionProps) throws IOException { super.perform(context, request, response); HttpSession session =request.getSession(); double[] data = new double[7]; for (int i = 0; i < data.length; i++){ data[i] = Math.random() * 150000; } BarChart chart = new BarChart(600,1999,data); response.setContentType("image/jpeg"); String strFileName = "test.jpg"; OutputStream imageout = response.getOutputStream(); imageout.write(chart.getJpegByteArray()); //context.put("trigger",chart.getJpegByteArray()); // doesn't Work } ---------------------------------------------- When I put the Image directly onto the response outputstream, the picture is shown. But ONLY the picture. I need to add some additional HTML Code around it. Like I said context.put() doesn't work. Can anybody help me out? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]