https://bz.apache.org/bugzilla/show_bug.cgi?id=69444

            Bug ID: 69444
           Summary: jakarta.servlet.error.message request attribute should
                    be empty string instead of null
           Product: Tomcat 10
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet
          Assignee: dev@tomcat.apache.org
          Reporter: pi...@tiscali.it
  Target Milestone: ------

Original issue with OmniFaces/Mojarra/Tomcat stack

https://github.com/omnifaces/omnifaces/issues/865#issuecomment-2444891221


When using 
<exception-type>java.lang.Throwable</exception-type> instead of 
<error-code>500</error-code> the jakarta.servlet.error.message 
request attribute becomes null when the thrown exception has no message.

When using <error-code>500</error-code> the jakarta.servlet.error.message
request attribute becomes an empty string when the thrown exception has no
message.

Tomcat could also have been wrong by setting the jakarta.servlet.error.message
request attribute with a null value instead of an empty string because the
Servlet spec says that these request attributes "must be set" which implies
that these may not be null in first place.

https://jakarta.ee/specifications/servlet/6.0/jakarta-servlet-spec-6.0#request-attributes

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to