I need to capture the HTML and do some post processing on the HTML data before it is finally output to the user. The final HTML document is actually composed of many JSP includes (12 or so), so there is some existing logic actually in the JSP. But I need the HTML that is generated. This has to be done on the server-side.
I have only thought of 2 options.
Use a JSP tag library and capture the output through some kind of body capture or something. But the JSPs are kind of a mess with so much code that ideally I was trying to avoid modifying any of the JSP pages.
Use the URL/Net libraries and connect to this page through a http request. But that is also kind of messy.