File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error-page tag

 
Murali Atmakuri
Greenhorn
Posts: 4
  • 0
  • 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?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • 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
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben,

Thanks for that! I can now see my error page
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic