Is there a way to create a HTML file generated in browser in a JSP file?
This same JSP file parsed by server and show up in a browser in HTML form
and also save this HTML form to a HTML file on the server.
The only way I can think of is using a StringBuffer to append all the HTML form data
and save to a file at the end of the JSP file?
<% StringBuffer htmlBuffer = new StringBuffer(); htmlBuffer.append("<HTML><HEAD>"); .... %> ...... <table width=100%> <tr> <td>Test This Data</td> </tr> </table> <% htmlBuffer.append<"\n<table width=100%>") .append("\n<tr>") .append("\n<td>Test This Data</td>") .append("\n<\tr>") .append("\n</table>"); %>
And eventually save this StringBuffer to a file.
I was wondering if there is any easier way.
I'd really appreciate it if anyone can shed some light.
thanks in advance.