Better handling of requestion tomcat version number

Im am sure this can be written better, but at least this works :) Also fixes a minor issue, that the javahome was not set correctly. At least not on RHEL6.