You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sobkowski, Andrej" <An...@emergis.com> on 2001/12/12 15:01:39 UTC

RE: How can I assign a value from a tag to a variabl e?

Tony,

I suppose you can use <bean:define>

<bean:define id="localMessageId" value="messageId" />
<%
	String newMessageId = "http:/localhost?messageId=" + localMessageId;
%>
OR

<a href="http://abc?messageId=<%= localMessageId %>">...</a> 

I haven't tried it but...

HTH

Andrej


> -----Original Message-----
> From: antony@claire.co.jp [mailto:antony@claire.co.jp]
> Sent: Tuesday, December 11, 2001 9:43 PM
> To: Struts Users Mailing List
> Subject: How can I assign a value from a <bean:write> tag to 
> a variable?
> 
> 
> 
> Hello
> 
> I have a <bean:write> tag
> 
> <bean:write name="messagestag" property="messageId" filter="true"/>
> 
> And want to assign this value to a variable I can use it in a 
> scriptlet,ie
> I want to do somehthing like
> 
> <% String messageId= <bean:write name="messagestag" 
> property="messageId" 
> filter="true"/> ;
>     String newMessageId = "http:/localhost?messageId=" + messageId;
> %>
> 
> How can I do this?
> 
> Cheers
> 
> Tony
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
>