Jump to content
Software FX Community

Reading licence in a Tomcat unexploded .war file


peteb

Recommended Posts

Hi,

I'm trying out the ChartFX Community Edition, and we are seriously considering adopting ChartFX for a project.

I'm having trouble getting ChartFX to successfully read the licence file in Tomcat 5.5. If I deploy my app as an exploded war, there is no problem at all, and I have managed to get ChartFX to read the file from application root/chartfx62/config, and also server/lib in Tomcat. However, if the app is deployed as an unexploded (i.e. compressed single file) war, I get error "Invalid License (A00000)" for both locations. It is a requirement that our app can be deployed as a single war file - is this possible with ChartFX? I also note in the docs that I could call setConfigPath(String) on the Chart object to hard code the path to the config directory - however, in version 6.5 (community edition), there is no such method.

Is there any way round this? We're actually not interested in the temp directory as we'll be using getHtmlData to generate the data through servlets.

Thanks, Pete Bowman.

Link to comment
Share on other sites

Yes, this is possible ussing setConfigPath, wich is available in all versions, may be not included in the docs, but the jar files are the same for CE, trial and production. 

Place the license and config files in a folder, and pass the physical path as parameter, Just be sure you call setConfigPath before you create the chart:

ChartServer.setConfigPath("<folder_where_license_is");

ChartServer chart1 = new ChartServer(pageContext,request,response);

 

Link to comment
Share on other sites

Ah, great, thanks. The installation docs have the method called on an instance of ChartServer, which will be why IntelliJ didn't give me the method as an option as it's a static method.

I've got it working now using setConfigPath.

 Many thanks, Pete.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...