Modified code so that we can deploy it as a war file.