Friday, 27 September 2013

Play framework external dynamic HTML handling

Play framework external dynamic HTML handling

I'm developing a web application on a Play framework 2.2.0 (Scala). The
application is generally taking some input from the user, and then calls
external module which in turn processes the input and generates html
report. The report has a rather complex structure with html, javascript
and json data, all put into different files. Then I wish to be able to
render this report to the user by the Play framework, without him having
to download report in an archive.
I tried to put these report files to some directory in the assets, and
Redirect, but this won't work in production. Then I tried to use
Ok.sendFile inline, but since content depends on other files the report
does not render correctly.
I wonder if there is any "intended" way to render such dynamically
generated HTML to the user?

No comments:

Post a Comment