Re: jCharts in Struts

Chris Ward <[email protected]> Sat, 6 Nov 2004 00:17:38 +0000
Newsgroups gmane.comp.krysalis.jcharts.user
Organization Integral Business Solutions
Message-ID <[email protected]>
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



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click