Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

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 in Java at Nov 19 2003, 08:51:19 AM MST 6 Comments
Comments:

If you use Eclipse you could give Colorer take5 plugin (http://colorer.sourceforge.net) a try. It has a HTML Generator for a lot of languages. There is also a web interface to it in its site.

Posted by Umlauf on November 19, 2003 at 11:31 AM MST #

OpenSymphony has a transform tag library which has the ability to highlight syntax, with a pluggable highlighter so you can create new languages as you need. See http://opensymphony.com/transformtags

Posted by Unknown on November 19, 2003 at 12:24 PM MST #

Heh, mozilla highlights html source, but it doesn't highlight css or javascript. 1 out of 3?

Posted by Brett Morgan on November 19, 2003 at 11:24 PM MST #

ViewCVS uses 'enscript' to do source-highlighting: http://people.ssh.com/mtr/genscript/

Posted by Charles Miller on November 20, 2003 at 12:49 AM MST #

Code2HTML is a small online tool to create syntax-highlighting (http://www.netzministerium.de/spezial/code2html/).

Posted by Till Nagel on November 20, 2003 at 06:53 AM MST #

I did the Colorer plugin - thanks for the tip Umlauf!

Posted by Matt Raible on November 21, 2003 at 05:51 PM MST #

Post a Comment:
  • HTML Syntax: Allowed