Uploaded image for project: 'Pax Web'
  1. Pax Web
  2. PAXWEB-341

Custom <error-page> in web.xml not working for WAB bundles

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.8
    • Fix Version/s: 1.1.3, 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      I'm using Karaf 2.2.2/PAX WEB 1.0.4 and Karaf 2.2.4/PAX WEB 1.0.8 to deploy some WAB bundles.

      For the most part everything is working as expected. The one thing I can't seem to get working is custom error pages in my web.xml:

      <error-page>
      <error-code>404</error-code>
      <location>/error.jsp</location>
      </error-page>

      <error-page>
      <exception-type>java.lang.Exception</exception-type>
      <location>/error.jsp</location>
      </error-page>

      When using the <error-code>404</error-code> I always get the default Jetty error message. I can access my "/error.jsp" page directly without issue.

      When using the <exception-type>java.lang.Exception</exception-type> it works for the first WAB bundle I install, but if I install other bundles it does not work.

      For the example files I'm deploying by dropping in Karaf's deploy folder. I've also tried installing using Karaf osgi:install command and via Karaf features.

        Attachments

          Activity

            People

            • Assignee:
              achim_nierbeck Achim Nierbeck
              Reporter:
              jeremy Jeremy
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: