Jump to content
Software FX Community

Chart is not getting displayed


User (Legacy)

Recommended Posts

Hi,

I have created a chart using ChatFX for java. Following code created

the chart image in the "chartfx6/temp" folder but it's not getting displayed

on the JSP page.

******************************************************************

<%

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

chart1.setChart3D(true);

XMLProvider sfxXml = new XMLProvider();

sfxXml.load(application.getRealPath("/ChartFX") +

"/data/Trend_ChartData.xml");

chart1.setDataSource(sfxXml);

%>

<%= chart1.getHtmlTag("700","280","JPEG") %>

********************************************************************

After looking the source, it seems that application name is not getting

picked up in the path to display the image.

How do see the values of application, request and response variables?

Thanks in advance for your help,

Vaishali

Link to comment
Share on other sites

Vaishali,

There are two ways I see to do this.

Both ways involve changing the ChartFX.Internet.config file that is located

in the same directory of the chartfx.jar on your webserver.

Just for sample sake you have two apps.

AppMain and myapp

They both are at the same level under webapps (siblings)

webapps

myapp

AppMain

By Adding this Node

<Relative>../myapp/chartfx6/temp</Relative>

will make this your image tag this if you hit this url

http://localhost:8080/AppMain/ChartTest.jsp

<IMG SRC="../myapp/chartfx6/temp/CFT0129_0157591FDBB.png" WIDTH="450"

HEIGHT="280" >

The OTHER way is adding this node:

<RequiredRoot>/myapp</RequiredRoot>

This just prepends the text /myapp to your URL

so you would get

<IMG SRC="/myapp/chartfx6/temp/CFT0129_0157591FDBB.png" WIDTH="450"

HEIGHT="280" >

RequiredRoot is a big buggy in the current service pack and requires you

making changes to allow "Cross Context" in your web application. There is

also a problem with tomcat and apache when you involve the root directory.

This is a documented bug in Tomcat.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11652

In the next service pack we will have RequiredRoot working properly besides

the documented issue.

Hope all this helps!

-CJS

"vaishali" <vnaik@retailexpert.com> wrote in message

news:Jp1rFwm5DHA.144@webserver3.softwarefx.com...

> Hi,

> I have created a chart using ChatFX for java. Following code created

> the chart image in the "chartfx6/temp" folder but it's not getting

displayed

> on the JSP page.

>

> ******************************************************************

> <%

> ChartServer chart1 = new ChartServer(application,request,response );

> chart1.setChart3D(true);

>

> XMLProvider sfxXml = new XMLProvider();

> sfxXml.load(application.getRealPath("/ChartFX") +

> "/data/Trend_ChartData.xml");

> chart1.setDataSource(sfxXml);

> %>

> <%= chart1.getHtmlTag("700","280","JPEG") %>

> ********************************************************************

>

>

> After looking the source, it seems that application name is not getting

> picked up in the path to display the image.

>

>

>

> How do see the values of application, request and response variables?

>

> Thanks in advance for your help,

>

> Vaishali

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...