This below url with myWebAppName should be the only valid url that Tomcat should process.

**<https://hostname:port/myWebAppName>** 

The above is working as expected.

Also , the invalid urls given in the below format i.e junk characters given after webappname, also displays the custom "404.html" as expected.

**<https://hostname:port/myWebAppName/xxxx>** 

Solution Requested : If we provide wrong web application name , the Tomcat Error Page is getting displayed instead of custom error page.

i.e <https://hostname:port/>**wrong**myWebAppName (or) <https://hostname:port/abcd>

**Location of 404.html** : Tomcat/webapps/myWebAppName/404.html

Please assist as early as possible. Would be highly obligued if this can be solved in web.xml itself , as I have already delivered war for test.

Thanks in Advance,
Ags