This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Getting MessageResources in ActionForm Validate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting MessageResources in ActionForm Validate" Watch "Getting MessageResources in ActionForm Validate" New topic
Author

Getting MessageResources in ActionForm Validate

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi All,

This question might have been asked many times but I have tried googling for sites but found no answers yet.

I just want to know on how I can have a reference on the nice MessageResources class of Struts in my action form validate method so
I wont hardcode my messages?

I have tried the following code but it was deprecated already.



I also found this piece of code but it keeps on returning null messageresource object.



I know I can get it from my action class but I need to know if I could access it in both the validate and reset method of the action form. Thanks!


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting MessageResources in ActionForm Validate
 
Similar Threads
Getting MessageResources inside ActionForm
Struts validation not displaying error messages
Reading the message resources from a form class
Struts Message resources
Getting values from properties in validate-using multiple message-resources in struts