Tomcat error page

Posted on 2006-05-15
Last Modified: 2007-12-19

I want a custom error page to handle all types of tomcat errors. Is it possible without having to add the errorPage directive to every single JSP?

Question by:MaritimeSource
    LVL 1

    Expert Comment

    Maybe you can use a redirect to a error page
    LVL 2

    Accepted Solution

    well if you are using some form of MVC pattern I am sure there are many points where yuo can intersect the error and redirect to the desired JSP.

    For example in struts you have a directive in the struts-config file that will let you do that.

    Also web.xml has the error-page element with the following nested elem

     A valid HTTP error code, for example, 404.
     A fully-qualified class name of a Java exception type, for example, java.lang.string
     The location of the resource to display in response to the error. For example, /myErrorPg.html.

    Naveen Sydney


    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now