use filters available in
servlets package to trap the output and then store them in the html files or anywhere you might want to use. that the easier way i think .. or else you can write your own writer and then i think you need to map your writer to the runtime environment which is more complicated as usually the PageContext class will instanciate your jspwriter and maps it to the default jspfactory and makes it available to your jsp page and then replace your own writer with the one present in the jsp i.e implicitly you get the out object in jsp and you need to replace it with your own writer and then i hope you can use the writer to get the desired output.
I have tried out both the ways but i feel that the filters are the better and easier way to do the task. If i am wrong plz do inform me. Thanks in advance