Hi, I have a servlet that draw charts, it works fine, but the data is
static, here is the function that has the static data :
/**
* Creates and returns a category data source for the demo charts.
*/
public CategoryDataSource createCategoryDataSource() {
Number[][] data = new Integer[][]
{ { new Integer(10), new Integer(4), new Integer(15), new Integer(14)
},
{ new Integer(5), new Integer(7), new Integer(14), new Integer(3) },
{ new Integer(6), new Integer(17), new Integer(12), new Integer(7)
},
{ new Integer(7), new Integer(15), new Integer(11), new Integer(0)
},
{ new Integer(8), new Integer(6), new Integer(10), new Integer(9) },
{ new Integer(9), new Integer(8), new Integer(8), new Integer(6) },
{ new Integer(10), new Integer(9), new Integer(7), new Integer(7) },
{ new Integer(11), new Integer(13), new Integer(9), new Integer(9)
},
{ new Integer(3), new Integer(7), new Integer(11), new Integer(10) }
};
return new DefaultCategoryDataSource(data);
}
Can someone please help me on how to have another servlet that get data from
a database and return the array data, so I can call the above function
snstead like this :
/**
* Creates and returns a category data source for the demo charts.
*/
public CategoryDataSource createCategoryDataSource() {
GET THE ARRAY DATA FROM ANOTHER SERVLET HERE
return new DefaultCategoryDataSource(data);
}
Thanks lot, your help will be appreciated.
Sufi
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets