ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Error while displaying the chart
Posted by Vranda on May-03-2015 15:32
Hello..

I am new with using charts in jsp and have been struggling with it for a long time now.
I have installed ChartDirector and also copied the jar file into my LIB folder.

The scenario now is:
I am working with Spring And HIbernate in java. And I am not able to configure the gantt
chart file given in the ChartDirector folder.
Please guide me through some basic steps i need to follow.

  Re: Error while displaying the chart
Posted by Peter Kwan on May-05-2015 01:36
Hi Vranda,

Have you tried with the sample code that comes with ChartDirector. Would you mind to clarify what is the issue? If you do not see the charts, would you mind to clarify what do you see (any error message)?

In case you do not even see the sample charts, please follow the steps below:

(a) Please make sure you are using a web server that supports JSP. If your server already have some JSP web pages that uses JSP code, and they work, then it can confirm it supports JSP.

(b) Please copy "ChartDirector.jar" to the "WEB-INF/lib" subdirectory of your web application. Note that it must be the "WEB-INF/lib" subdirectory of your web application (there can be multiple web applications in a web server and each application can have a different "WEB-INF/lib" subdirectory). Also, the directory is called ""WEB-INF/lib". You should use small case for "lib" for safety. Although the Windows file system may be case insensitive, the Java system itself can be case sensitive.

(c) Copy "simplebar.jsp" and "getchart.jsp" to your web application, then access "simplebar.jsp". Note that you need "getchart.jsp" as well, as "simplebar.jsp" uses it in its code. Please let me know what you see (including any error message). If what you see is a broken image symbol (like a "red X"), please go into the red X to obtain the error message. See:


http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_faq&thread=1117817200

Regards
Peter Kwan

  Re: Error while displaying the chart
Posted by Vranda on May-05-2015 11:37
Thank you for your reply peter..

I have followed all the following steps..
The error message that i am getting is that:

only a broken image.. I tried to get the message behind that image and when i executed
the message itself in my browser, it says page not found.

Basically I am not using any servlet to pass the data, I only have Configuration of SPRING
AND HIBERNATE in my Project that uses "Controller", "Service","DAO", "Beans" Classes
that are handling my JSP pages through the mapping done in XML file..

Even after copying the ChartDirector.jar in my lib folder and copying the getchart.jsp in
my source folder I am not able to acess the chart.

I also wanted to know what does this "?" means in the specific line..
<%=response.encodeURL("getchart.jsp?"+chart1URL)%>

Kindly help.. Because I am trying to configure this chart for a long time now, need to
speed up my project work.

Thanks and Regards..
Vranda

  Re: Error while displaying the chart
Posted by Peter Kwan on May-05-2015 23:05
Hi Vranda,

The "page not found" usually just means the page specified by the URL does not exist on
the server. Please check what is the page referred to by the URL, and whether it exists on
the server. For example, if the URL is:

http://aaa.bbb.ccc/pqr/stu/getchart.jsp?aaa=bbb

Then the page referred to is at the URL path "/pqr/stu/getchart.jsp". Please check if there
is really a "getchart.jsp" in that path. Note that the above is the URL path. Your web server
may map it to a file system path of different name, or your system may have some XML
configuration that maps the jsp to other names. Please just make sure the file exist in the
proper place and name so that your web server can find it.

The "?" is just the query separate as per URL standard. If you look at the URL in this forum
page, you probably can see the "?" too. It is a standard way to pass parameters to a web
page. The real page is "getchart.jsp".

You mentioned you are using "SPRING AND HIBERNATE" in your project and it is "handling
your JSP pages through mapping done in XML file". I have never used "SPRING AND
HIBERNATE" before and are not aware of the details. From what you mentioned, is it
possible your XML maps the "getchart.jsp" to somewhere else?

Regards
Peter Kwan

  Re: Error while displaying the chart
Posted by Vranda on May-05-2015 23:21
Could you lend me a help and just guide me through the basic steps i need to follow for
showing a gantt chart in my project.

I might have made some mistake, if you could tell me the procedure, I would be able to
cross check my work..

Thank You
Vranda

  Re: Error while displaying the chart
Posted by Peter Kwan on May-06-2015 10:09
Hi Vranda,

Actually, the procedure is already in the documentation:

http://www.advsofteng.com/doc/cdjava.htm#install.htm

In the simplest case, just install the ChartDirector as a web application in your JSP web
server, and you should be able to use it and try all the sample code. You can them
modify the gantt chart sample code for your own need.

Sometimes people would use additional frameworks (such as JSF, Struts, Spring,
WebObjects, Google Web Toolkit, ...... etc). Even in this case, I suggest you first test
ChartDirector as a standard web application in your JSP web server without these
additional frameworks. This can confirm if ChartDirector is working in your web server.
Then you can modify the code to use it in your framework. Because there are many
frameworks around, we cannot be familiar with all of them, and we cannot provide detail
steps on how to use these frameworks. However, from experience (we have tried the JSF
and Struts frameworks), it should be easy to port the code to another framework. You
just need to know how these framework works comparing to plain JSP (eg. how the URL
are resolved and they route the requests, etc).

For your case, if you can provide me with the error message, I can try my best to inform
you want I think. If your error message is "page not found", then it just means "page not
found", and the cause is probably of using incorrect URL. One reason the URL is incorrect
is because the framework maps the URL to something else. You must know how the
mapping occur and modify the URL to suit the framework, or put the file in the location
the framework expects, or disable the framework routing for that URL.

Regards
Peter Kwan

  Re: Error while displaying the chart
Posted by Vranda on May-15-2015 23:01
Thank you so much Peter... :)

Your support kept me motivated and I have been able to solve the earlier issue that i had
in displaying the gantt chart with the data values of my database table using Spring and
Hibernate.

Really Appreciate your effort...