JHighlight is an embeddable Java syntax
highlighting library that supports Java, Groovy, C++, HTML,
XHTML, XML, and LZX languages and outputs to
XHTML. The library can be used in several ways:
embedded into another tool (for instance a blog
or forum), through the command-line to generate
highlighted files locally, or as a servlet filter
to highlight source files on your server on-the-
fly. It also supports RIFE templates tags and
highlights them clearly so that you can easily
identify the difference between your RIFE markup
and the actual marked up source.