How to display line graph using JFreeChart in jsp?

前端 未结 2 1208
甜味超标
甜味超标 2020-12-20 02:41

HI All:
I am using the below to diplay the line graph. when i run the below code, i am getting the window but it is blank and not displaying the graph. Please help me

2条回答
  •  暖寄归人
    2020-12-20 02:59

    You are using a swing approach which does not work in a web setting. You must generate an Image, and flatten it to e.g. a JPEG byte stream, and return THAT as a response from your servlet with a correct MIME type.

    I did this many moons ago but do not have the code anymore.

提交回复
热议问题