You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2003/03/11 04:30:33 UTC

DO NOT REPLY [Bug 17855] New: - ELMessagesPresentTag gives NullPointerException when name not specified

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17855>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17855

ELMessagesPresentTag gives NullPointerException when name not specified

           Summary: ELMessagesPresentTag gives NullPointerException when
                    name not specified
           Product: Struts
           Version: 1.1 RC1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Custom Tags
        AssignedTo: struts-dev@jakarta.apache.org
        ReportedBy: apache-bugs@a.leader-bg.com


(Not sure what is the right place to report bugs for the EL taglib contrib)

If used as:
<logic:messagesPresent>
...
</logic:messagesPresent>

will give NullPointerException. The tag class inherits from MessagesPresentTag,
which defaults "name" to "org.apache.struts.action.ERROR", but this class does
not  default its "nameExpr" property, and later overrides the underlying "name"
to null.

Seems the easiest way is to default "nameExpr" to
"org.apache.struts.action.ERROR" (actually, Globals.ERROR_KEY), but there might
be a better approach.

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org