wood burning stoves 2.0*
The moose likes Struts and the fly likes validation error msg with properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation error msg with properties file" Watch "validation error msg with properties file" New topic

validation error msg with properties file

Vish hari

Joined: Jul 21, 2008
Posts: 20
Hi Friends,

I am validating the fields in the formbean validate method. Following is the code for adding errors.

1) errors.add("name", new ActionError("id"));--> logonForm.java
id = UserName is invalid --> ApplicationResources.properties
Problem is ActionError cannot be resolved at all, eclipse prompts for create a class 'Action error' in the package org.struts.action.

2) errors.add("UserName",new ActionMessage("errors.required")); --> logonForm.java
errors.required = UserName is invalid --> messageresources.properties

In both the ways errors are not printing out.

In struts-config.xml, it was given that <message-resources parameter=com.org.resorces.ApplicationResources>.

Please revert back if you know the solution

I agree. Here's the link: http://aspose.com/file-tools
subject: validation error msg with properties file