This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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).