From: Chris W. <cw...@go...> - 2004-11-05 17:55:04
|
On Friday 05 November 2004 05:11 pm, Rod Macpherson wrote: > Given your analysis it makes no sense whatsoever for you to use > servlets. In my case we have one or two people looking at realtime > graphs so the servlet might have been ideal. The problem is it needs to > be embedded in the page with other HTML items. Anybody know if the > servlet output be the target of an image tag? If not we will have to > save the realtime image to a file and create a dynamic reference to it. > That leaves the problem of writing file resources from a bundled up WAR > or EAR file. > I am pretty sure that the 'standard' way of accessing jcharts would be through a servlet accessed via an image tag. That is the basic premis of how the 'tracking gifs' work. When you put a servlet in an image tag, the web client you are using doesn't care what is on the back end. It just expects to see some binary image data. So that is what you do: <img src="www.mysite.com/myservlet?graph=x&parm=y"> Then myservlet takes the parms, makes a graph, and returns binary data, and the web client is none the wiser. Chris |