I am using Microsoft Sql Express. Possible changes that may affect my problem: 1 my domain user password reset 2 server ip address changed 3 it appears that my System Environment Variables have disappeared. 1 I have a web app which Tomcat says it has deployed, but when I go to its URL, I get a 404. The war file is called sonar.war, and is deployed in WebApps. Mar 18, 2015 Chelsea Adams Brooks is a long-distance cyclist, aspiring cob house builder, schema/analytics/algorithm obsessor, and a former senior content writer at Bruce Clay, Inc. HTTP Status 404 Tomcat Apache. Ask Question Asked 7 years, 4 months ago. Active 4 years, 6 months ago. Viewed 59k times 7. I'm going to be honest, never used this. Jul 10, 2012 A custom 404 page is a good opportunity to keep them on your site and do more to redirect them to their destination. Before going through this tutorial, you should already have created a custom 404 page and saved it into your website's directory. Implement the 404 Page. To edit the 404 page, open up or create the site's.htaccess file.
Since tomcat doesn’t come with user friendly messages when an error occurs. This situation can be handled by Configuring custom error pages in Tomcat.
The most common type of error messages are 404, 400 & 500 . As the tomcat’s default error pages expose the Version of tomcat, it’s important to hide the version information as part of security best practices.
Let’s get started with the configuration stuff now.
I have installed Tomcat under /opt so my CATALINA_HOME value is /opt/apache-tomcat-7.0.63/
STEP1: Tomcat Configuration
Edit /opt/apache-tomcat-7.0.63/conf/web.xml and add the following configuration just before </web-app>
STEP2: Creating custom error pages.
I have deployed my application as ROOT, so i will place my 3 custom error html files under /opt/apache-tomcat-7.0.63/webapps/ROOT/
Now create 3 seperate html files called 404.html, 500.html & 400.html
touch 404.html 500.html 400.html
Now i will update these files with suitable error messages.
Apache Tomcat 404
STEP3: Restarting Tomcat server
Apache Tomcat 404 Page
Once you restart tomcat server, try to access any non existing URL on the server & you should be able to see custom error messages as you created