ChartDirector 7.0 (Java Edition)

GetSessionImage


ChartDirector.GetSessionImage is a utility servlet that retrieves an image from a session variable, and returns the image to the browser.

GetSessionImage is typically used in the URL of an <IMG> tag, so that the <IMG> tag can reference an image in a session variable.

The name of the session variable is specify as a URL query parameter "img". For example, "getchart.chart?img=chart1" will retrieve an image from the session variable "chart1", assuming URL "*.chart" maps to the GetSessionImage servlet.

For compatibility with previous versions of ChartDirector, GetSessionImage also supports specifying the session variable name as the name of the servlet. For example, "xyz.chart" will retrieve the image from the session variable "xyz". This syntax is now deprecated.

To use GetSessionImage, you need to set up the necessary URL to servlet mappings. Please refer to the Installation section for details.

GetSessionImage is usually used together with BaseChart.makeSession. The latter creates a chart image in a session variable, and returns an URL query string that can be used directly by GetSessionImage.

The GetSessionImage performs the same function as getchart.jsp. It is an alternative to getchart.jsp for servlet applications that do not use JSP.