Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900973 (JBPAPP6-1363)

Summary: web.xml error-page does not implement the default page
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Tom Fonteyne <tfonteyn>
Component: WebAssignee: baranowb <bbaranow>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: bbaranow, bkundal, cdewolf, myarboro, rhatlapa, tfonteyn
Target Milestone: ---   
Target Release: EAP 6.1.0, EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1363
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
JBoss EAP 6.0.0
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
errpagetest.tar.gz none

Description Tom Fonteyne 2012-10-02 10:34:05 UTC
Help Desk Ticket Reference: https://gss--c.na7.visual.force.com/apex/Case_View?id=500A000000AveoPIAR&sfdc.override=1
Steps to Reproduce: deploy the attached war file, access
  /errpagetest 
then click on one of the links

Instead of the configured "err.jsp", we get the default error pages of JBoss EAP.


Workaround: Workaround Exists
Workaround Description: Use the 2.5 style specifying a catch all "java.lang.Exception" entry, and adding multiple entries for all possible HTTP error codes.
project_key: JBPAPP6

In servlet specs 2.x, the error-page element required either an error-code or an exception-type sub element.

In specs 3.0 both of those have become optional, although the actual line in the spec is vague it is clear in the xsd:

<xsd:complexType name="error-pageType">
...
    <xsd:sequence>
      <xsd:choice minOccurs="0"
                  maxOccurs="1">
        <xsd:element name="error-code"
                     type="javaee:error-codeType"/>
        <xsd:element name="exception-type"
                     type="javaee:fully-qualified-classType">
          <xsd:annotation>


==>  minOccurs="0"

Useful links:

https://blogs.oracle.com/arungupta/entry/totd_136_default_error_page
http://docs.oracle.com/cd/E24329_01/web.1211/e21049/web_xml.htm#i1023942
https://issues.apache.org/bugzilla/show_bug.cgi?id=52135

So it seems Oracle talks about this, it's implemented in Tomcat, WebLogic,
I also found Glassfish to implement this. I've not checked WebSphere though.

A testcase, attached, show this not to work on JBoss EAP 6.0.0

Comment 1 Tom Fonteyne 2012-10-02 10:35:02 UTC
a deployable war file can be found in the "dist" directory

Comment 2 Tom Fonteyne 2012-10-02 10:35:02 UTC
Attachment: Added: errpagetest.tar.gz


Comment 3 Anne-Louise Tangring 2012-11-13 20:57:49 UTC
Docs QE Status: Removed: NEW 


Comment 4 Radim Hatlapatka 2013-02-22 13:07:56 UTC
I have tried it with EAP 6.1.0.DR4 and it seems to be already fixed

Comment 6 baranowb 2013-06-05 10:24:42 UTC
I claim thee.

Comment 7 Radim Hatlapatka 2013-06-05 10:29:03 UTC
I have verified, that this is actually already fixed in EAP 6.1.0.GA => setting to verified