I am creating pie chart using jfreechart , I am dynamicaly taking the values from DB and showing them in pie form. I have two java file one for database and other is for showing applet (applet class have main , which calls the DB class). All code properly works well in java. But I want these to be run through jsp. such that it get embedded in jsp. I am trying many ways but unable to do it . Could you please guide me how to move forward.
Below is my applet .java file
I even tried the <applet> tag but it is not loading in the browser, I searched Internet and used all the way but no success. Could you please help me, if possible a sample JSP calling this applet will be much appreciated.
Joined: Sep 21, 2011
What did you put in the applet tag? Were there any messages in the Java Console?
The code you posted is not an applet, so you would have had to rewrite it.
I tried to save my applet on the server machine using robot method and it is working properly
But the issue here is..it is capturing whole screen ..instead of just applet...Please let me know if there is another way of saving applet .
Joined: Aug 05, 2010
abhishek rawat wrote:..I tried to save my applet on the server machine using robot method and it is working properly ..
But the issue here is..it is capturing whole screen
What is the connection between showing a chart in a web page, and saving a screen-shot (of an applet or the screen) to the server?
As to "it is working properly" - I bet you have not tried this yet in a situation where the server and client are 2 different machines. Would I win that bet? ;)
Joined: Oct 13, 2011
abhishek rawat wrote:But you guys have any idea ..How I will call the above file in jsp?..which extends application frame...
As Andrew suggested before, you should consider the solution of generating an image version of the report in a Servlet, then push the image to client (via a call to the Servlet in your JSP page, maybe).