• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in validating the form in Struts

 
shanthi naidu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you spelled "properties" wrong.
 
shanthi naidu
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh!! sorry it was a typo while posting the file name is ApplicationResource.properties only
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No problem--glad you figured it out :)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic