Sunday 3 February 2013

Comparing Java web application runtime environments

In a recent project the developers in my team have encountered some unexpected differences in behaviour at runtime.  What works fine in one environment could result in a server error in other - supposedly equivalent - environments.

The code and configuration of the web application should in theory be the same, so I'd like to have a way of checking what is actually different under the hood at runtime.

My initial thoughts are that the following will be relevant:
 - environment variables
 - JVM properties
 - loaded classes (or packages)

Exposing the data is one aspect, but in order for this to be useful beyond a one off check it would be good to have a way of quickly highlighting any differences between the output from two setups.

If the data is all key-value pairs then I expect the detecting of differences to be trivial.

UPDATE:
The problem JSPs turned out to be including some expression language syntax.