I'm fairly new to web application development...so my question may appear standard to some of you, but I'll appreciate some pointers in the right direction.
I need to create a page which when somebody accesses using a GET request and passing in some parameters for stock tickers would show stock charts for those companies. My initial thought is that this would be done within a JSP page from which I would call a servlet and pass in each of those stock tickers one by one (thus making multiple servlet calls). Then those images returned would be displayed somehow in the JSP. Is that how it should work?
Also, initially I will just have some static images that my servlet will pull and display. But, in a real world scenariom where would these images be generated from? Let's say I want to show a chart for the last 5 years, that chart would obviously be different today than it will be 2 years from now. So somehow this chart needs to be generated dynamically. How would this be accomplished?
Look for chart generation tools first. There are plenty of them, MSN live search will help you find one. Then you can create a servlet which will use this charting tool by supplying data and then return generated image to a browser. Calling of you servlet can look like: <img src="http://mycoolcompany/mytickerapp/myticker.jsp?ticker=NVDA&period=2yers" border="0">
When your servlet gets such request, it should take parameters, based on them request data from database, then pass the data to charting tool, get image from charting tool as byte array and return this image back to a browser. Do not forget to set content type as image/gif or other format your charting tool supports.