Question: I am using application loader to upload my IPA on TestFlight to make it available for testers to test the app. 
Application loader shows a successfully uploaded message but when I log into iTunesConnect in Apple developer account, I don't see the build in TestFlight under that particular app. 

This is what application loader shows. 
[![enter image description here](https://i.stack.imgur.com/eT3aQ.png)](https://i.stack.imgur.com/eT3aQ.png)

This is what the iTunesConnect shows. 
[![enter image description here](https://i.stack.imgur.com/IVViI.png)](https://i.stack.imgur.com/IVViI.png)

Answer: 
To answer your question :

> 
> 1. Add custom 404 error page for Tomcat when it has to deal with URLs
>  that represents non-existing context.
> 
> 
> 

And respecting your initial constraint :

> 
> I am not at liberty to point only /app/\* to mod\_jk, as we sometimes
>  deploy other wars that start with app for debugging purposes - for
>  e.g. app-debug.war.
> 
> 
> 

The simplest solution is to use a ROOT webapp folder. However, and to respect your other condition to keep your *webapps* folder minimalist, **you don't have to keep anything in your ROOT webapp folder but your custom error page**. 

With this configuration, you just have to add in your $CATALINA\_BASE/conf/web.xml

```
<error-page>
  <error-code>404</error-code>
  <location>/general-error.html</location>
</error-page>

```

Or anything that fits best what you want. (Here, you can use the same error custom page than your app.war and end users will not see the difference).

---

The result is :

Situation 1 : `http://hostname/non-existing-page`

* The httpd error custom page will be displayed

Situation 2 : `http://hostname/app/non-existing-page`

* The error custom page of your application app.war will be displayed. ($CATALINA\_BASE/conf/web.xml and then $CATALINA\_BASE/webapps/app/WEB-INF/web.xml are used)

Situation 3 : `http://hostname/app-dummy-url`

* The Tomcat error custom page of your ROOT folder will be displayed. (Only $CATALINA\_BASE/conf/web.xml is used).

---

In you edit, you deleted your constraint and are now able to :

> 
> chang(e) mod\_jk workers.properties to forward only /app/\* to Tomcat.
> 
> 
> 

Well in this configuration, you will have the same result as the alternative you wanted :

> 
> 2. Or configure httpd such that if it sees that Tomcat is returning 404
>  error, it renders its own custom 404 error page.
> 
> 
> 

But if you still want to use debug war file such as you mentioned in your question (app-debug.war), you will need to modify your httpd configuration (worker.properties and probably your VirtualHosts as well) everytime and/or let debug configuration in those files. As it doesn't seems appropriate for a production environment, using a folder ROOT in Tomcat containing only custom pages seems the best solution here IMO.
If you have integrated tomcat with apache and using mod\_jk for it then use below step for 404 and 401 custom error page.

All steps are mention in below link.

<https://devopstech2020.blogspot.com/2021/07/use-custom-error-page-for-tomcats-404.html>