Yeah, and then submit the patch and ask a comitter if this would be 
better than throwing an exception. I�m all for it!

    if (message == null) {
    /*
        JspException e = new JspException
        (messages.getMessage("message.message", key));
            RequestUtils.saveException(pageContext, e);
            throw e;
    */
            ResponseUtils.write(pageContext, key);
        }

joachim gjesdal

Hani Hamandi wrote:

>Ok, and then what? Re-jar struts myself with this new source-code?
>Thanks!
>
>-----Original Message-----
>From: Joachim Gjesdal [mailto:[EMAIL PROTECTED]]
>Sent: Monday, March 04, 2002 4:27 PM
>To: Struts Users Mailing List
>Subject: Re: <bean:message> default key?
>
>
>Hani,
>No, its easy :-) , just see the sourcecode for 
>org.apache.struts.MessageTAG, remove the JSPException that is thrown and 
>return the key.
>
>joachim gjesdal
>
>Hani Hamandi wrote:
>
>>Man! Is this a hard one? :(
>>
>>-----Original Message-----
>>From: Hani Hamandi [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, March 04, 2002 11:49 AM
>>To: Struts Users Mailing List (E-mail)
>>Subject: <bean:message> default key?
>>
>>
>>Folks,
>>
>>Is there any way to tell <bean:message>, "if you can't find this key, then
>>use that key" ?
>>
>>Here's what I would like to do:
>>For every property in my ApplicationResources, I would like to have a
>>default value, and a couple different texts for different contexts (in the
>>same language, English).
>>So I thought of this (so far theoretical) approach:
>>Here's how one property, "X.Y.Z" for example, would look like:
>>
>>X.Y.Z=default text
>>A.X.Y.Z=different text A
>>B.X.Y.Z=different text B
>>
>>What I want to achieve is:
>>
>>Whenever I use <bean:message key = "A.X.Y.Z" />, if this key is not found,
>>then use the key "X.Y.Z" (the default value). And similarly, whenever I use
>><bean:message key = "B.X.Y.Z" />, if this key is not found, then use the
>>"X.Y.Z".
>>
>>Is there any way to do that?
>>
>>Thanks!
>>Hani.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>>--
>>To unsubscribe, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>>For additional commands, e-mail:
>>
><mailto:[EMAIL PROTECTED]>
>
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to