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 Problem in validating the form in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in validating the form in Struts" Watch "Problem in validating the form in Struts" New topic
Author

Problem in validating the form in Struts

shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
Hi,

I got a problem while validating the form
when i click the submit button without entering username and password
im getting the following instead of the error messages from ApplicationResource.properities file

but im expecting the messages like


Please suggest me any solution.

Thank you,
Shanthi Naidu
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Is your file named what you said above, or was that a typo? Do any other labels/messages from that file work?
shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
Thanks for the reply...

the file name is same and every msg from that file im getting in the above mentioned
format only...


-Shanthi
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Well, you spelled "properties" wrong.
shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
oh!! sorry it was a typo while posting the file name is ApplicationResource.properties only
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I thought the default was "ApplicationResources.properties", but I honestly don't remember.

In any case, it can be configured explicitly:

http://struts.apache.org/1.2.x/userGuide/configuration.html#resources_config
http://struts.apache.org/1.3.10/userGuide/building_view.html#a3.2_Internationalized_Messages
shanthi naidu
Ranch Hand

Joined: Nov 13, 2008
Posts: 39
Hi David Newton,

Thanks for the reply... you solved my problem..
the file name i used is ApplicationResource.properties but while configuring
in the struts-config i mentioned as ApplicationResources when i removed the last
"s" i got the output in the required format

Thanks a lott!! once again
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

No problem--glad you figured it out :)
 
Consider Paul's rocket mass heater.
 
subject: Problem in validating the form in Struts