File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Accessing error messages defined in package.properties from MyAction.validate method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Accessing error messages defined in package.properties from MyAction.validate method" Watch "Accessing error messages defined in package.properties from MyAction.validate method" New topic
Author

Accessing error messages defined in package.properties from MyAction.validate method

Fletcher Munson
Ranch Hand

Joined: May 16, 2007
Posts: 31
How do pull messages from the package.properties file for my actions? I'm running some user entered data against my DB, and need to display an error message if the validation fails. I would like to just define the message in the package.properties file with the rest of the ones I've defined for the xml validation, but I don't understand how to access them in the validate method in my action. I thought it would be something like addActionError("myMessage");, but this only displays myMessage on the GUI. Can someone give me a hint?

Thank you in advance,
Fletcher


SCJP 5, SCWCD 1.4
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Fletcher Munson
Ranch Hand

Joined: May 16, 2007
Posts: 31
Ever have those moments were you feel totally brilliant? This is not one of them.

Thanks again.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Ever have those moments were you feel totally brilliant?

No :(
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing error messages defined in package.properties from MyAction.validate method