Specifies the Web Application Server root directory.

void object.SetDocumentRoot( String directory_pathname )

Arguments

object
Required. A Chart object.
directory_pathname
Required. A string specifying the absolute pathname of the web server root directory.

Remarks

Swiff Chart Generator requires the absolute pathname of the root directory in order to locate the chart cache folder. The document root directory is the directory on the disk associated with the Web Application Server root (i.e. the directory corresponding to http://<my_app_server>/)

The document root is required prior to any call to the Swiff Chart Generator API.

Warning: Swiff Chart Generator requires the valid absolute pathname of the Web Application Server root. If this value is not valid, the chart generation will fail.

JSP Sample Code

The following JSP code illustrates use of the SetDocumentRoot method.

// Create the chart series
SwiffChart chart= new SwiffChart( installation_dir );

// For example, in the case of Tomcat Windows
chart.SetDocumentRoot("C:\\tomcat\\webapps\\ROOT\\");

See Also

SetServletInfo Method

Applies To: Chart Object