That's not true.  What version of Struts are you using?

Try it this way:

 <bean:define id="myVariable">
     <bean:message key="propmt.welcome"/>
 </bean:define>


* Also, you mispelled "prompt".  Not sure if you were aware or 
  maybe just a typo.


--
James Mitchell
Software Engineer/Struts Evangelist


"Beer is the reason we get up each afternoon."
       Ray McNeill 



> -----Original Message-----
> From: Amit Keshav Kulkarni [mailto:[EMAIL PROTECTED] 
> Sent: Monday, February 24, 2003 6:14 AM
> To: Struts Users Mailing List
> Subject: RE: Assigning value from Application Resources to a 
> java variable in JSP
> 
> 
> Hi Nico,
> I tried the same.
> It gives the following error:
> 
> The TLD description for tag 'define' requires that the body be empty.
> probably occurred due to an error in /jsp/Welcome.jsp line 6:
> <bean:define id="myVariable" type="String"> 
> 
> 
> -Amit
> 
> 
> 
> -----Original Message-----
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 4:30 PM
> To: Struts Users Mailing List
> Subject: Re: Assigning value from Application Resources to a java
> variable in JSP
> 
> 
> Try this :
> 
> <bean:define id="myVariable" type="String">
>     <bean:message key="propmt.welcome"/>
> </bean:define>
> 
> You can then use "myVariable" as a script variable or a bean 
> in page scope.
> 
> Nico.
> 
> 
> 
> Hi All,
> I want to assign the value of a key from my Application 
> Resources file to a
> Java variable
> in a JSP Page.
> 
> e.g. In My Application Resource file i have
> prompt.welcome=Welcome
> 
> In my JSP file I want this value of "propmt.welcome" to be 
> assigned to a
> Java Variable.
> 
> How can I do this?
> 
> 
> TIA
> Amit
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


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

Reply via email to