需要一个基于Java的HTML美化工来清理Velocity生成的HTML [英] Need a Java-based HTML prettifier to clean up Velocity-generated HTML
问题描述
寻找一个不错的很好)基于Java的HTML美化工具可以在将其转储到servlet响应之前运行生成的HTML,以使源代码更好看。
第三方集成商希望能够浏览HTML并知道哪些模板导致问题。第一步是HTML格式。
感谢您提供的任何指导!
JTidy 有一个 JTidyFilter
。只需在 web.xml
中定义它,HTML就会被批准。
Web app I'm working on generates HTML using Velocity templates. Problem is that using whitespace in velocity templates and other formatting results in butt-ugly HTML (excessive whitespace, misalignment, etc.)
Looking for a nice (single jar packaging would be nice) Java-based HTML prettifier to run over the generated HTML right before we dump it to the servlet response to make the source nicer to look at.
Third party integrators would like to be able to glance at the HTML and know which templates are causing problems. The first step to this is having the HTML formatted nicely.
Thanks in advance for any guidance you can provide!
JTidy has a JTidyFilter
. Just define it in web.xml
and the respone HTML will be prettified.
这篇关于需要一个基于Java的HTML美化工来清理Velocity生成的HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!