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/02/12 19:38:42 UTC

DO NOT REPLY [Bug 17016] - RequestUtils.message does not check for message key not found

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=17016>.
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=17016

RequestUtils.message does not check for message key not found





------- Additional Comments From martinc@apache.org  2003-02-12 18:38 -------
The problem is not with RequestUtils.message(). That method *should* be allowed 
to return null, in order to allow it to fulfill the contract with the 'null' 
attribute of the <controller> element in struts-config.xml.

The real problem is in MessagesTag.doStartTag(), where no check for null is 
performed before calling pageContext.setAttribute(). It is illegal to call that 
method with a null attribute value. (In fact, the spec says that doing so will 
result in exactly what you are seeing. ;) So we should be checking for null, 
and removing any existing value for the attribute in that case.

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