Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9207615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:25:36+00:00 2026-06-18T00:25:36+00:00

In the web.xml file, I’m trying to specify an error page as follows. <error-page>

  • 0

In the web.xml file, I’m trying to specify an error page as follows.

<error-page>
    <location>/WEB-INF/jsp/admin/ErrorPage.jsp</location>
</error-page>

I expect it to go without an error code according to Servlet 3.0 but it doesn’t. I have to explicitly specify an appropriate error code for it to work something like the following.

<error-page>
    <description>Missing page</description>
    <error-code>404</error-code>
    <location>/WEB-INF/jsp/admin/ErrorPage.jsp</location>
</error-page>

Why doesn’t the former approach work with Servlet 3.0?


I have upgraded NetBeans 7.2.1. It supports Apache Tomcat 7.0.27.0 which has Servlet 3.0 API.

By the way, I have disabled the HTTP Monitor as it raises the following warning.

MonitorFilter::WARNING: the monitor filter must be the first filter in
the chain.

It happened when I used Spring security in my application and it was reported as a jira issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:25:37+00:00Added an answer on June 18, 2026 at 12:25 am

    Have a look at this post. I never personally made this

    <error-page>
        <location>/WEB-INF/jsp/admin/ErrorPage.jsp</location>
    </error-page>
    

    working on Tomcat 7, as for the bug described in the link I gave you. I don’t know if Apache solved it in later version of Tomcat, but I doubt.
    My previous statement was probably wrong. Digging a bit, I found this: https://issues.apache.org/bugzilla/show_bug.cgi?id=52135 and the problem should have been solved in Tomcat 7.0.29, so your only solution is to update to post-29 version.

    Here: http://tomcat.apache.org/tomcat-7.0-doc/changelog.html, in the changelog for version 7.0.29 you can read why there was such an issue:

    Add support for a default error page to be defined in web.xml by
    defining an error page with just a nested location element. It appears
    this feature was intended to be included in the Servlet 3.0
    specification but was accidently left out. (markt)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this XML in my web.xml file: <error-page> <error-code>404</error-code> <location>/error/html/404</location> </error-page> If I
I'm trying to specify a relative directory in the web.xml file. I basically want
I configured a custom error page in my web.xml file, but the image referenced
I am trying to get the Display name (Context Root) from web.xml file to
Jsf library (that is included in WEB-INF/lib) might contain its own faces-config.xml file. Is
I'm using JSF 2.0.5, Tomcat 7.0.12 and prettyfaces. My web.xml file is: <welcome-file-list> <welcome-file>/index.jsp</welcome-file>
I want to change the location of web.xml file of a tomcat web application.
In Jetty 6 I need to create a WEB-INF/jetty-web.xml file which contains this: <Configure
If I do not specify the following in my web.xml file: <session-config> <session-timeout>10</session-timeout> </session-config>
Say in my web.xml file, I define a servlet like so: <url-pattern>/MyURL/*</url-pattern> How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.