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 Form page issue with validation message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form page issue with validation message" Watch "Form page issue with validation message" New topic
Author

Form page issue with validation message

Joseph Smithern
Ranch Hand

Joined: Feb 11, 2006
Posts: 89
I have a Struts login that works great with my Tomcat 5.5 container.

The only issue I have is when a bad username is entered it gives me this message:
???en_US.Not valid User Name.???

It should only show this without the bolded part:
Not valid User Name.

I can get rid of the ???en_US...??? part when the username is valid on the action success page using this Strut bean element:


Please advise How I can do the same for my login form when someone enters an invalid username?

I cant seem to put in a <bean:message key="errors.name.required" /> in the form page. Here is what I have on my form page:


My ApplicationResources file:


Please advise.
[ November 26, 2006: Message edited by: Joseph Smithern ]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Even though you haven't shown it to us, I suspect the problem is in what you put in the validation.xml file. make sure the value you put as arg0 is a key that exists in your ApplicationResources.properties file. Example:


In this example prompt.username must exist as a key in the ApplicationResources.properties file.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Form page issue with validation message