Thanks Dusty.... I finally get this working and how....I was re-initializing the chart in my execute() method after declaring it as a private variable...DUH DUH DUH !!!!!!
DO let me know if anyone else would be interested in a small tutorial on using the new plug-in of struts 2 ....I would be more than glad to help As always thanks guys... Tks...VJ dusty wrote: > > What is the JFreeChart code in your action that creates the chart. > Perhaps you have a problem there and the chart is not getting created or > the variable is not getting populated? > > > > VJ22 wrote: >> >> Yes...exactly... >> >> We are using the standardized one...unfortunately....we are not able to >> retrieve the chart of the value stack....that is why the error.... >> >> Tks....VJ >> >> >> dusty wrote: >>> >>> Here are some JFreeChart results used in WebWork (Struts2's parent). >>> >>> http://www.opensymphony.com/webwork/wikidocs/JFreeChartResult.html >>> >>> It looks like in Struts they have formalized the JFreeChart result type: >>> http://struts.apache.org/2.x/struts2-plugins/struts2-jfreechart-plugin/apidocs/index.html >>> >>> >>> >>> VJ22 wrote: >>>> >>>> Thanks Matt/David, >>>> >>>> I presume that by a servlet class you mean you flush the PNG file onto >>>> the output stream which is then rendered by the JSP....We are aware of >>>> that solution.... >>>> >>>> What we intend to use is the pull-MVC mechanism of Struts2...which >>>> helps us use the getChart() method to render the chart >>>> >>>> Tks...Vijay >>>> >>>> >>>> J. David Mendoza R. wrote: >>>>> >>>>> Hello Vijay... >>>>> >>>>> I'm using appfuse 1.9.4, spring and jfreechart, and what I did is, I >>>>> made a servlet that uses jfreechart's tools to generate the chart as a >>>>> PNG image and just present it within the JSP... This should work with >>>>> any web framework... >>>>> >>>>> David M. >>>>> >>>>> VJ22 wrote: >>>>>> Hello All, >>>>>> >>>>>> The problem that I face while integrating AppFuse with JFreeChart >>>>>> >>>>>> So I have a link which points to viewChart.html configured from the >>>>>> menu..When I click on this link I got an action class which populates >>>>>> the >>>>>> chart (Unit-tests prove that the png file is generated >>>>>> fine)...re-directs it >>>>>> to viewChart.jsp which has got the following image code >>>>>> >>>>>> <image src="/viewChart.html"/> -> which I presume will get the chart >>>>>> from >>>>>> the action >>>>>> >>>>>> The problem exception happens when it tries to execute the getChart() >>>>>> method...in the action class....A part of the stack-trace is attached >>>>>> here >>>>>> >>>>>> java.lang.NullPointerException: No chart found >>>>>> at >>>>>> org.apache.struts2.dispatcher.ChartResult.execute(ChartResult.java:105) >>>>>> at >>>>>> com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvo >>>>>> cation.java:343) >>>>>> >>>>>> So I assume that the chart object is being invalidated....but why ? I >>>>>> assume >>>>>> this uses a pull-MVC architecture...any help would be gladly >>>>>> appreciated..... >>>>>> >>>>>> struts.xml configuration >>>>>> >>>>>> <package name="chart" extends="jfreechart-default"> >>>>>> <action name="viewChart" >>>>>> class="com.pwmliteexp1.pwmLitexp1.web.action.PWMLitePieChartAction" >>>>>> scope="session"> >>>>>> <result name="success" >>>>>> type="chart">/WEB-INF/pages/viewChart.jsp</result> >>>>>> </action> >>>>>> </package> >>>>>> >>>>>> Thanks in advance >>>>>> >>>>>> Rgds....Vijay >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/JfreeChart---Struts2---Appfuse-detailed-problem-report-tf3279271s2369.html#a9152914 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
