Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

error-page tag  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i used this tag for 404 HTML error code,this is working randomly.
When requested for a non existing resource, sometimes it diplays my error page and sometimes it displays the Tomcat's error page with message and sometimes browser's "The page cannot be found" is displayed.

Can any one help me in explaining why this is happening?
 
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could it be that the requests which are causing the tomcat 404 page to be shown have URLs which are outside the context where they are defined?

Example:
http://localhost:8080/your_context/asdf
Showing your 404 page.

http://localhost:8080/asdf
Showing the tomcat 404

If this is the case, you might consider adding your custom 404 handling to the ROOT application. Either that or make your app the default app.
 
Murali Atmakuri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,
The requests are within the context and often it displays the browser's 404 "Page no displayed" message of the browser.

Example:
http://localhost:8080/myApp/asdf
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser's 404 page is a different issue.

MSIE, by default, will display it's own error message when a site sends back a failing response code (404 in this case). You can stop this by going to Tools -> Options -> Advanced (tab) -> and then unchecking the "Show Friendly Http Errors" checkbox.
 
Murali Atmakuri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

Thanks for that! I can now see my error page
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!