You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by makhno <ma...@yahoo.com> on 2007/07/11 21:17:08 UTC

Setting an action scoped attribute to a string literal with ?

Hello. Is it possible to create and set an action scoped attribute to a
string literal with <struts:set>?

<struts:set name="x" value="hello"> will search for an attribute named
"hello" and try to evaluate it.

But I want x to be literrally "hello".
-- 
View this message in context: http://www.nabble.com/Setting-an-action-scoped-attribute-to-a-string-literal-with-%3Cstruts%3Aset%3E--tf4064070.html#a11547052
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Setting an action scoped attribute to a string literal with ?

Posted by makhno <ma...@yahoo.com>.
I am sorry DNewfield, I did not test it right
Your solution works
Thank you very much




makhno wrote:
> 
> That does not seem to assign "hello" to x attribute
> lloks like the attribute remains unassigned
> 
> 
> DNewfield wrote:
>> 
>> makhno wrote:
>>> <struts:set name="x" value="hello"> will search for an attribute named
>>> "hello" and try to evaluate it.
>> 
>> So give it something that when evaluated is the string you want:
>> value="%{'hello'}"
>> 
>> -Dale
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Setting-an-action-scoped-attribute-to-a-string-literal-with-%3Cstruts%3Aset%3E--tf4064070.html#a11548752
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Setting an action scoped attribute to a string literal with ?

Posted by makhno <ma...@yahoo.com>.
That does not seem to assign "hello" to x attribute
lloks like the attribute remains unassigned


DNewfield wrote:
> 
> makhno wrote:
>> <struts:set name="x" value="hello"> will search for an attribute named
>> "hello" and try to evaluate it.
> 
> So give it something that when evaluated is the string you want:
> value="%{'hello'}"
> 
> -Dale
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Setting-an-action-scoped-attribute-to-a-string-literal-with-%3Cstruts%3Aset%3E--tf4064070.html#a11547782
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Setting an action scoped attribute to a string literal with ?

Posted by Dale Newfield <Da...@Newfield.org>.
makhno wrote:
> <struts:set name="x" value="hello"> will search for an attribute named
> "hello" and try to evaluate it.

So give it something that when evaluated is the string you want:
value="%{'hello'}"

-Dale

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