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#a9130054
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to