Tomcat and shard defines into separate files and updated setenv.sh template.