|

Embedding Jasper

Jasper is the JSP compiler inside Tomcat. For reasons, mainly of curiosity, I wanted to build a Pragmatach plugin which exposes Jasper.  Pragmatach supports some template engines such as FreeMarker, ThymeLeaf and Velocity, but I thought Jasper would be a good addition.

I chose to use Tomcat 6, mainly because Tomcat 7 uses Servlet 3.0.  Pragmatach is currently on Servlet 2.5 .   Luckily, there is a really helpful example of compiling JSPs right inside Tomcat; the JspC shell.  JspC is a simple command-line executable which can consume jsp files and produce both .java files and .class files.

The code I ended up with, is here.

Similar Posts

  • Building a simple RIAK ORM

    I’ve been interested in RIAK for a while, and ORM’s are nothing short of fascinating. I decided to try writing an ORM for Riak, and the results are here: https://github.com/teverett/cbean My ORM is not an ORM of course, because RIAK is not relational. However it is ORM-like; I can store POJO’s and retrieve them. The…

  • OpenAPI

    I recently had reason to get to know OpenAPI at work, so I decided to become familiar with it. I have a HomeSeer home controller at home, which exposes a JSON API, so I decided to write a Java OpenAPI server to expose the JSON API over OpenAPI. The net result is hsOpenAPI. It exposes…

  • TNT

    If you haven’t read this book, I highly recommend it.  I discovered it in high school and finally purchased my first copy at the now-gone Duthie Books in Kitsilano.  Without going into the details of the book, the author uses a simple Peano arithmetic called Typographical Number Theory  (TNT) to illustrate some of his points. An example…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.