Ok, what's different from the gazillion other similar tools?
I wrote Code2Web in about a week for my personal needs - publishing tutorials with source code on the web. A tutorial with source code is different from dumping your sorce on the web with some pretty styles. Some irrelevant parts of the code may need to be hidden. Some others - highlighted. Specific links at specific points must be inserted to other resources on the web - be them javadocs, other source files, or whatever. I might need to annotate a part of the code to illustrate a point.
So why don't use a standard Java 2 HTML converter and then perform the edits by hand? Well, because if there is one thing that I hate is the double-maintenance problem : having to remember - each time when I change a source code - that I must change something else somewhere in order to keep them in sync. So I needed a tool that would allow me to do all those things in one step without having to store the final result.
So Code2Web has currently the following features:
Here are some examples of the generated code:
If you are a developer wishing to generate HTML from the source code on the fly, you can use the HTMLConverter class to handle the conversion and manipulate all options programmatically
If you are an end-user wishing to convert some source code to HTML using a command-like program, you can use the included code2web program to perform the conversion. All options are set from the command line.
If you are a web designer wishing to convert on the fly source code to HTML and embed it in a pre-existing design, you can use the included JSP Tag . However, this requires a Servlet/JSP compatible server.