How to host user-generated HTML pages from Java web app? -
my java web application needs serve many static html reports.
the reports generated on-demand using 3rd party application based on user's inputs. reports different run run, can't cached. reports include multiple html pages (including js , css pages), , relative links between files.
what's easiest way serve these reports front-end user?
the reports don't need stick around -- can deleted after set time or after user logs out.
i'm using:
tomcat 7 spring frameworkhere similar example:
suppose web app online ide, , you'd generate , display javadoc pages project.
i utilize web server, such apache, this, since java applications behind apache. here apache example:
# serve /path/to/html/files/ static files stored @ /var/path/to/files/ proxypass /path/to/html/files/ ! alias /path/to/html/files/ /var/path/to/files/ # proxy / java application @ localhost:8080 proxypass / http://localhost:8080/ if must utilize pure java solution, seek set file download servlet, such 1 balusc. careful handling file paths supplied in request urls, servlet can vulnerable directory traversal attack.
java html spring
No comments:
Post a Comment