Java2HTMLFilter is used to syntax highlight the code wrapped in a \{\{\{ ... \}\}\} pair. Currently it treats the content inside as a java source snippet. It utilizes the Java2Html libary by MarkusGebhard, the author of Java2HtmlPlugin. So the rendering result is the same as his sample.

The difference between this filter and Java2HtmlPlugin is that it only renders one part of a page. The other parts are not affected.

TODO: More languages are expected to be supported, such as .properties, xml/html, jython. With Java2HtmlPlugin, the most difficult language is done easily. The others are quite simple but need more codings.

To beautify the converted result, you may need to change/add some CSS entries. My CSS is as follows: {
        margin-left: 20px;
        margin-top: 5px;
        margin-bottom: 5px
    } td {
        background: ivory;

Don't forget to add a line to your file:

jspwiki.pageFilter.100 = org.simon.jspwiki.filters.Java2HTMLFilter


I've done all things, it does not work. :(

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java 1.3 kB 1 02-Mar-2004 11:17 Echou
« This page (revision-3) was last changed on 12-May-2005 05:21 by TurboChen