title: How to handle 404 in application context level
body: <p>I have 2 applications/projects deployed in tomcat 7 web server. There context paths are different like "project1", "project2". When I hit URLs with these context path, corresponding application loads and works fine. </p>
  
  <p>Valid URLs are:</p>
  
  <p><a href="http://localhost:8080/project1" rel="nofollow">http://localhost:8080/project1</a></p>
  
  <p><a href="http://localhost:8080/project2" rel="nofollow">http://localhost:8080/project2</a></p>
  
  <p>Now when I hit any wrong URL with correct host name and incorrect context path like <strong>/project3</strong>, it give me error message
  <strong>404 not found</strong> and shows a weird screen to the user. </p>
  
  <p>I want to show a proper page with proper message to the end user. How can I do that in web server level?</p>