Kaushal and Mark,

On 2/4/24 15:00, Mark Thomas wrote:
On 02/02/2024 18:48, Kaushal Shriyan wrote:
Hi,

I am running tomcat version 9.0.84 on Red Hat Enterprise Linux release 8.7 (Ootpa). Is there a way to configure the server to return a custom page in
the event of a client requesting a non-existent resource.

Yes.

Please guide me.

To do this at the web application level:

Read section 10.9.2 of the Servlet 4.0 specification


To do this globally, look at the errorCode.nnn attribute of the ErrorReportValve

https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Error_Report_Valve

You can also deploy a ROOT web application which maps HTTP status codes to whatever pages you want (configured as per Servlet spec referenced above).

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to