This can be achieved by Rewrite Valve, it's pretty similar to mod_rewrite in httpd :
1- Include rewrite valve in your global context file context.xml or your host context server.xml , I recommend it here :
<Host>
<Context>
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
</Context>
</Host>
2- Create rewrite valve configuration file under the host configuration folder as the above :
$CATALINA_HOME/conf/Catalina/<host_name>/rewrite.config
3- Write your rewrite rule and save the configuration file :
RewriteRule ^(.*)$ http://domainname.com/$1 [L]
3- Restart tomcat
For a comprehensive review, check the official documentation