Grails: displaying created image in gsp

前端 未结 8 2039
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 10:07

I\'m very new to Grails so there\'s probably a very simple answer to this question. I\'m trying to display a dynamically created image in a gsp. The image is NOT stored in

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 10:43

    my suggestion actually has two parts.

    1) Use the solution recommend by Rob above to generate the chart artifact, however save it to a static file with a unique identifier that is passed back as part of the response from the form submit, then rendering the chart is no different then rendering any other image.

    i would suggest that the identifer be constructed from the specifif params passed in on the form submit so they can be used as a caching mechanism to render the chart again without rebuilding it

    2) create a service, maybe a Quartz Service, that periodically cleans up the static charts that were created for the application

提交回复
热议问题