Implementation of adam's challenge in java using spring mvc.