'How to resolve Tomcat 6 400 Bad Request Error

Recently I have posted regarding "How can I remove the application name from a Grails application’s URL?". The solution for this was

first shutdown your tomcat [from the bin directory (sh shutdown.sh)] then you must delete all the content of your tomcat webapps folder (rm -fr *) then rename your WAR file to ROOT.war finally start your tomcat [from the bin directory (sh startup.sh)].

The problem with the above solution is that tomcat 6 gives me 400 bad request error whenever i access using the domain name (http://myapp.mydomain.com). How to resolve the issue. With IP (http://1.x.x.x) its working fine But the domain name it gives me error like this.

You can refer My old post Here



Solution 1:[1]

You should configure Tomcat Host: http://tomcat.apache.org/tomcat-6.0-doc/config/host.html

If you have just one application, you can just edit existing value of name attribute.

But if you need to create a new application, and keep existing applications under existing hosts, then you should also setup appBase attribute, pinting to a different directory (it's a directory for your ROOT.war)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Igor Artamonov