You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Erron Austin <er...@gmail.com> on 2007/07/12 22:26:34 UTC

VelocityViewServlet and JTidy (or any HTML Parser)

For my project (don't want to start a whitespace war), I would like to try
integrating Jtidy (I may try other parsers as well) with my web app that's
using a sub-class of the VelocityViewServlet.  Does anyone have an example
of how to do this?

My purpose is to clean up the final source and to ensure that the resultant
code is xhtml.

Thanks,

Erron

Re: VelocityViewServlet and JTidy (or any HTML Parser)

Posted by Claude Brisson <cl...@renegat.net>.
Le jeudi 12 juillet 2007 à 16:26 -0400, Erron Austin a écrit :
> For my project (don't want to start a whitespace war), I would like to try
> integrating Jtidy (I may try other parsers as well) with my web app that's
> using a sub-class of the VelocityViewServlet.  Does anyone have an example
> of how to do this?
> 
> My purpose is to clean up the final source and to ensure that the resultant
> code is xhtml.

I'm pretty sure you only need to set up a JTidyFilter in your web.xml,
rather than integrate it with the view servlet.

See http://jtidy.sourceforge.net/multiproject/jtidyservlet/filter.html


  Claude

> Thanks,
> 
> Erron


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: VelocityViewServlet and JTidy (or any HTML Parser)

Posted by Joe Attardi <ja...@gmail.com>.
This sounds like a really cool idea. The ugly HTML is one of my biggest
complaints about Velocity!

-- 
Joe Attardi
jattardi@gmail.com
http://thinksincode.blogspot.com/

On 7/12/07, Erron Austin <er...@gmail.com> wrote:
>
> For my project (don't want to start a whitespace war), I would like to try
> integrating Jtidy (I may try other parsers as well) with my web app that's
> using a sub-class of the VelocityViewServlet.  Does anyone have an example
> of how to do this?
>
> My purpose is to clean up the final source and to ensure that the
> resultant
> code is xhtml.
>
> Thanks,
>
> Erron
>