A couple notes:
* Mark's suggestion will only work if you've already put the message in the
session under the "key" attribute.
* The mix of double quotes in Mark's code probably won't work...i believe it
should instead read:
<logic:equal parameter='<%= session.getAtribute("key") %>' value="true">
You guessed right! You win an auomatic avocado peeler!
</logic:equal>
Maybe try something like this instead (only works with Struts 1.1):
<bean:define id="foo">
<bean:message key="isThisTheRightValue"/>
</bean:define>
<logic:equal parameter="<%= foo %>" value="true">
You guessed right! You win an auomatic avocado peeler!
</logic:equal>
Or this, if you're using Struts 1.0.2:
<bean:define id="foo"
value='<%= ((MessageResources)request
.getAttribute("org.apache.struts.action.MESSAGE"))
.getMessage("isThisTheRightValue") %>'/>
<logic:equal parameter="<%= foo %>" value="true">
You guessed right! You win an auomatic avocado peeler!
</logic:equal>
Hope that helps.
chris
> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 11:39 AM
> To: 'Struts Users Mailing List'
> Subject: RE: message checking
>
>
> Instead of using <bean:message> use a scriptlet:
>
> <logic:equal parameter="<%= session.getAtribute("key") %>"
> value="true">
> You guessed right! You win an auomatic avocado peeler!
> </logic:equal>
>
> Mark
>
> -----Original Message-----
> From: Mark Silva [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 12:03 PM
>
> i think your visualization/interpretation of one will do it
> more justice
> than i can in words ;-)
>
> so whats the technique for doing this?
>
> thanks,
> mark
>
> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 20, 2002 4:57 AM
>
> Yes, but first, what is an "auomatic" avocado peeler? Sounds
> like some kind
> of Lisp debugger.
>
> Mark
>
> -----Original Message-----
> From: Mark Silva [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 19, 2002 6:53 PM
>
> is is possible to check for the existence of a message in my
> page, and then
> output some html if it is there? or if it is equal to
> something. i am
> looking to do something like this, (although this code
> doesn't seem to work)
>
> <logic:equal parameter="<bean:message key="isThisTheRightValue"/>"
> value="true">
> You guessed right! You win an auomatic avocado peeler!
> </logic:equal>
>
> thanks,
> mark
>
> --
> 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]>