Problem
When I add images to the right or the page all I get is a missing image
icon.
Reason
imageTemplate.jsp tries to call
BufferedImage.createGraphics() and that doesn't work in headless mode
without a bit of effort.
Solution
Prior to J2SE 1.4 the only way around this was to run a dummy Xserver or use
a custom AWT toolkit like PJA. Now all you need to do is set a system
property. Just stick the following line into catalina.sh (in under both your
author/public tomcat installation dirs) just underneath the preliminary
comments:
CATALINA_OPTS="-Djava.awt.headless=true"
Although imageTemplate.jsp will now work fine, it is important to note that
not all Swing/AWT classes will work in headless mode. Unsupported operations
will result in a java.awt.HeadlessException.
See this link for more info:
http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless