MessageResources mr = getResources(request);
String messageValue = mr.getMessage(messageKey);

-Abdullah

-----Original Message-----
From: Tony Smith [mailto:[EMAIL PROTECTED]
Sent: Friday, July 08, 2005 12:05 AM
To: Struts Users Mailing List
Subject: access entries in MessageResources.properties from java code


How can I access entries in
"MessageResources.properties" inside Action or Form
code?

Thanks,

--- Rick Reumann <[EMAIL PROTECTED]> wrote:

> Hubert Rabago wrote the following on 7/8/2005 12:24
> AM:
> >  There are several
> > reasons why you shouldn't use VOs as your form
> beans and vice versa
> > (as other msgs in this thread explain).  
> 
> Actually in this thread so far I haven't heard
> anyone explain why they 
> are a 'bad' idea. The only way I see it being 'sort
> of' bad would be if...
> 
> 1) You insist upon using the validation framework by
> having validation 
> take place by setting validation="true" in your
> struts-config mappings. 
> (I like to call validation manually in my Actions so
> this isn't really a 
>   problem - it's like an extra line or two of code).
> 
> 2) Sometimes you have some odd non-VO type
> properties that you want to 
> send to your Action. If you insist these needed to
> be captured by some 
> kind of bean/ActionForm than yea I guess that's a
> minor problem... but 
> what's the big deal about using an occasional
> request.getParameter("") 
> or since you are using Struts you still 'have' to
> use an ActionForm just 
> add the VO as a property and you can still a few
> other misc fields if 
> you so desire.
> 
> ActionForm == "The Black Sheep of Struts" :)
> 
> -- 
> Rick
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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