| Author |
Calling a static method with a struts variable
|
Frank Bueckert
Greenhorn
Joined: Mar 23, 2006
Posts: 8
|
|
Not exactly sure how to go about this. I'm using the JFreeChart jar file to generate a dynamic image based on the data I'm using. That's all fine and dandy. My problem is accessing a variable I'm defining in the action, and using it in a scriptlet to write an imagemap straight into the JSP. This defines the variable for the JSP. That part works fine. However, when I try to use it in a scriptlet, it turns up as null. I've tried using "info", "(org.jfree.chart.ChartRenderingInfo) info", and any other variations I can come up with. I know I'm doing something wrong, but I have no idea what.
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
You can't nest one Struts tag inside another. change your <bean:define>tag to: <bean:define id="info" type="org.jfree.chart.ChartRenderingInfo" scope="page" name="graphForm" property="info"/> If you do this, your scriptlet should work. You could also try getting the info bean directly from the ActionForm, as in: [ July 18, 2006: Message edited by: Merrill Higginson ]
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: Calling a static method with a struts variable
|
|
|