Using a servlet filter would be the easiest way to implement something like this (no change required to your application or to Struts), but I'm having a hard time understanding why anyone would want to spend the extra server side processing cycles for doing this. It won't have any affect on the semantics of the HTML page, and won't even be visible to a browser user unless they use the "View Source" option.
If you're interested in this solely to reduce the number of whitespace characters, you'd be better off designing a filter that just focused on collapsing those (which will run a lot faster than a general HTML tidying application). Alternatively, if your client browser support processing compressed responses, you might look at using a Filter that applies compression on the entire response stream, thereby reducing the number of bytes sent down the wire. Tomcat has an example filter in its source code that does exactly this sort of thing. Craig On Fri, 17 Sep 2004 20:15:12 -0500, Dave Bender <[EMAIL PROTECTED]> wrote: > Has anybody integrated JTidy or any of the other HTML-prettifiers with > Struts? I find Tidy does a good job of cleaning up JSPs, which tend to get > pretty spaced out particularly when there are lots of includes, but I don't > have a clear idea of where it would plug in. Would it make sense to put it > into a servlet filter and then chain that onto the Struts controller > servlet? Or is there a logical spot to put that functionality somewhere > inside the framework (attach to an action or something??). Or would it be a > plug in? > > Thoughts? > > Dave > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]