I am attempting to build dynamic charts (as PNG images) in a JSP.  I can easily do this by using a servlet as the source of an image tag as follows:
 
<img src="/servlet/buildchart">
 
The problem is the data to build my chart will reside in an instance of a session bean (i.e. a bean that has scope= "session").  I can think of the following two approaches to handle this:
 
1) Access the bean instance that has the data from my servlet. 
 
2) Have a method in the bean generate a dynamic image stream and include it in the JSP using something like: <img src="<%= mybean.getMeAChart()%>">
 
Does anyone know how to best implement either or both of these approaches?
 
Thanks!
 
- David

Reply via email to