You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richmond Te <ri...@yahoo.com> on 2002/12/17 05:59:32 UTC

bean:messages tag

i am using <bean:message key='form.maxNumber'/> fine
but i need to assign that key value to my jsp
scriptlet something like ie.
<% 
String aKey = "<bean:message key='form.maxNumber'/>";
int i = Integer.parseInt(aKey);
%>

but the "aKey" contains the text "<bean:message
key='form.maxNumber'/>" instead of the value it
represents when declared outside a scriptlet..

thanks
richmond


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: bean:messages tag

Posted by Patrice <pp...@nerim.net>.
Tags are interprated after scriplets, that's why you can't use tags inside
scriplets.
In struts 1.1, you can do:
<bean:define id="aKey"><bean:message key="form.maxNumber"/></bean:define>
<% int i = Integer.parseInt(aKey); %>

Hope it helps
Patrice

----- Original Message -----
From: "Richmond Te" <ri...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, December 17, 2002 5:59 AM
Subject: bean:messages tag


> i am using <bean:message key='form.maxNumber'/> fine
> but i need to assign that key value to my jsp
> scriptlet something like ie.
> <%
> String aKey = "<bean:message key='form.maxNumber'/>";
> int i = Integer.parseInt(aKey);
> %>
>
> but the "aKey" contains the text "<bean:message
> key='form.maxNumber'/>" instead of the value it
> represents when declared outside a scriptlet..
>
> thanks
> richmond
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>