struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Beskrowni <ABeskro...@axeda.com>
Subject RE: Message Resource
Date Fri, 01 Feb 2002 15:59:12 GMT
what i'd recommend is that you override the bean:define tag so that it takes
a body.  anything in the body becomes that value that is stored by the id
attribute.  you can then reuse this new bean:define to store any value that
requires evaluation:

<bean:define id="foo" scope="request">
  <bean:message key="some.key"/>
</bean:define>

now your message resource is stored in the HttpRequest under the key "foo".
it should take you all of 10-15 minutes to do this.

ab

-----Original Message-----
From: Satish Jeejula [mailto:JeejulaS@ia.com]
Sent: Thursday, January 31, 2002 8:43 PM
To: 'Struts Users Mailing List'; 'struts-user@jakarta.apache.org'
Subject: RE: Message Resource


Matt,

That will only render the key value from properties file onto the browser.
Actually, I would like to do some processing in the jsp page after getting
the value.

Example:

<% double value = Double.parseDouble(getValue from properties file ...);
	if(condition depends on the value) {
		... do some processing ... ;
	}
%>

So I would like to get the key values from the properties file directly.
using the bean tag (message) .. I can only render it on the page.

Any help is appreciated ..

thanks,
Satish
	
	

-----Original Message-----
From: Matt Raible [mailto:matt_raible@yahoo.com]
Sent: Thursday, January 31, 2002 8:33 PM
To: Struts Users Mailing List
Subject: Re: Message Resource


<bean:message key="<keyName in properties file>"/>

--- Satish Jeejula <JeejulaS@ia.com> wrote:
> Hello,
> 
> How can I get hold of the message resource from jsp page?
> I can do this in my actions by calling getResources() method.
> 
> Is possible to get message resources from jsp pages???
> 
> Thanks,
> Satish
> 
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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

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

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


Mime
View raw message