Action Error ???en_US.logonForm.username??? ???en_US.logonForm.password???

A

Arun Nair

I have a <html:errors/> defined in a page(Logon.jsp) and in my
LogonForm (extends ActionForm) I have a validate method:
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {

ActionErrors errors = new ActionErrors();

if ((username == null) || (username.length() < 1))
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("logonForm.username"));

if ((password == null) || (password.length() < 1))
errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError("logonForm.password"));

return errors;

}

But this method gives me an output like
???en_US.logonForm.username??? ???en_US.logonForm.password???

Can anyone tell me why? My application.properties files contains:
# -- standard errors --
errors.header=<H3><FONT color="red">Validation Error</FONT></H3>You
must correct the following error(s) before proceeding:<UL>
errors.prefix=<LI>
errors.suffix=</LI>
errors.footer=</UL><BR>
# -- validator --
errors.invalid={0} is invalid.
errors.maxlength={0} can not be greater than {1} characters.
errors.minlength={0} can not be less than {1} characters.
errors.range={0} is not in the range {1} through {2}.
errors.double={0} must be an double.
errors.float={0} must be an float.
# -- welcome --
welcome.title=Employment Exchange Application
welcome.heading=Welcome!
logonForm.username=<LI>user name required</LI>
logonForm.password=A password must be entered

--------------------------------------

I first thought that struts was not able to find the
application.properties
file. So, I tried putting the application.properties file in the
WEB-INF/classes/resources folder as well as the WEB-INF/classes
folder.
Neither seems to solve the problem. I have spent 4 days on this but
of on avail.

My struts-config.xml contains the following relevent entries(besides
others):

<message-resources parameter="resource.Application" null="false" />

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathname"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>


What should I do?

thanks

Arun
(e-mail address removed)
 
R

Ryan Stewart

Arun Nair said:
I tried putting the application.properties file in the
WEB-INF/classes/resources folder as well as the WEB-INF/classes
folder. ....
<message-resources parameter="resource.Application" null="false" />
<message-resources parameter="resources.application"/>

It's case sensitive and should point to the path in classes where the
properties file is with fully qualified Java style name.
 
A

Andrew S.

Can anyone tell me why? My application.properties files contains:
My struts-config.xml contains the following relevent entries(besides
others):

<message-resources parameter="resource.Application" null="false" />
<snip>

File name case sensitivy: [A|a]pplication.properties?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top