

In this block, we have to define the valid container, listener, engine, etc. Therefore, this is the starting block for our server.xml file. The first block is the " Server" - This element represents the entire catalina servlet container.

So, here is the brief idea about the meaning of each specified block in that given file, and how you can configure them according to your requirements. Many of you are using Tomcat as a server for web deployment, some of you may change the server.xml file according to your requirements like the port, the given certificate for SSL, etc. Make sure that you must restart your tomcat server to view this effect.Today I am going to explain every single block in server.xml file of Tomcat 8. But we love to solve problems and fix things, so reach one of us directly and we’ll get this move back on track. This page probably doesn’t help with that, even though it’s pretty cute. Next step is to create error.jsp file in your web application directory under /webapps folder and add the following code into it:īody In our case, Apache Tomcat Server is installed in /opt/tomcat/apache-tomcat-8.5.32 directory. To migrate this issue, you need to add the following code into your web.xml file located at /conf directory. Let’s look at a common 404 error message on a site running on Apache Tomcat Server.Ĭustomization of these error responses can be configured in the configuration file web.xml. A generic 404 page can frustrate these newbies and make them leave your site never to return. However, your site visitors might be new to the Internet or not fully understand how websites work. Whatever the reason, when the visitor hits that error page, you want it to be a funnel back into your site or you risk losing your visitor to your competition.Įspecially when we talk about Apache’s Tomcat Server, an error page always reveals your server’s sensitive information like Apache Version etc. As a web savvy person, you automatically understand why a 404 error was returned. Perhaps the visitor adds a strange extension to the end of the web address, or maybe she has bookmarked an old page and your organizational structure has changed. A 404 error is an HTTP status code that means that the page you were trying to reach on a website couldn’t be found on their server.Īt some point, a visitor is going to stumble onto a 403/404/500 error page.
