i am trying to create chart and save chart in image folder. it works fine locally but when i hosted it in openshift online it doesn't work.
String root = getServletContext().getRealPath("/");
File savedFile = new File(root+"\\images\\piechart.jpg");
ChartUtilities.saveChartAsJPEG(savedFile, piechart, 700, 400);
root gives null so saving is not working ... please help to store image.