would it be ok if in the ServletUtilities class it will have a method that will set and get the image directory coz for nor it only and always save the image in System.getProperty("java.io.tmpdir")...
My idea is that anytime we can set the image directory...
it will looks like this...
//default value if it is not set...
private static String tempFileDirectory = System.getProperty("java.io.tmpdir");
public static void setTempFileDirectory(String directory)
{
if (directory == null)
{
throw new IllegalArgumentException("Null 'directory' argument.");
}
ServletUtilities.tempFileDirectory = directory;
}
public static String getTempFileDirectory() {
return ServletUtilities.tempFileDirectory;
}
Thanks!...
ServletUtilities
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I can't see a problem with that, but I'll run it past the original author of the class anyway (he knows more about it than I do). I've e-mailed him.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
ServletUtilities
I do not have a particular problem with the change. But do you have a particular reason why you could not just change the java.io.tmpdir using System.setProperty(...)? Do you particularly need your charts stored in a different temporary directory to other temporary files? If you do not need the DisplayChart servlet functionality and auto-deletion at the end of the session, consider using the ChartUtilities methods to save the image in the directory of your choice.
Regards,
Richard...
Regards,
Richard...