Wanted: View Source with syntax highlighting
The Display Tag has a nice feature in
it's documentation: the ability to view the source of a JSP [example].
This is done using a servlet, and works fairly well. However, as I write
documentation for Struts Menu, I'm
finding I need to view more than just the source of JSPs, but also the source
of stylesheets, scripts and Velocity templates. So far, I've found that the view source
protocol works fairly well for this.
Nice Tabs Menu Examples: generated HTML, its
JavaScript file, its
CSS file
Normally, I would be perfectly happy with this - except the view-source
protocol doesn't seem to work in Safari (last time I checked). Secondly, I got
to thinking - it sure would be nice to have a Servlet (or some other
technology) that would read in a file and spit out it's contents with syntax
highlighting. This is to say that you'd see in your browser what you see in
your editor (i.e. BBEdit, HomeSite, Eclipse, etc.).
The ideal tool would allow me to pass in a URL to a file, and it would spit out
an HTML version of that file, complete with syntax highlighting. It'd be
similar to Java2HTML, but it would allow
HTML, JavaScript, Java, CSS and JSP. I noticed that it might be possible to generate
HTML from Java using Java2HTML on the fly, but that only covers one file
type. Another option is to instruct documentation readers to change their view-source editor to be their favorite editor.
Has anyone seen such a tool? It sure would be sweet for writing better
and more readable documentation for web developers.
Posted by Umlauf on November 19, 2003 at 05:31 PM MST #
Posted by Unknown on November 19, 2003 at 06:24 PM MST #
Posted by Brett Morgan on November 20, 2003 at 05:24 AM MST #
Posted by Charles Miller on November 20, 2003 at 06:49 AM MST #
Posted by Till Nagel on November 20, 2003 at 12:53 PM MST #
Posted by Matt Raible on November 21, 2003 at 11:51 PM MST #