in struts-bean.tld (1.1RC1) : <name>define</name> <tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass> <teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass> <bodycontent>JSP</bodycontent>
in 1.0.2 <name>define</name> <tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass> <teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass> <bodycontent>empty</bodycontent> Your right, this looks like an enhancement comming whith 1.1 Perhaps you should upgrade to 1.1 or write your own custom tag by extending <bean:message> to ad some "id" attribute like bean:define does ? Nico. ----- Original Message ----- From: "Amit Keshav Kulkarni" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, February 24, 2003 12:13 PM 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]