• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

errors messages from ActionForm validate are not displaying

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
In Action Form validate method iam doing some validations and returning errors. but those errors are not displaying in my jsp page. In my jsp page iam displaying those errors as list, iam getting only those listing dots but no messages are displaying.
Iam not getting wat is the problem. my application resources are also correct. still iam not getting those messages.
Please help me it is very urgent for me.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you 100% sure the message key used when you create an ActionMessage matches one of the message keys in your ApplicationResources.properties file?

If you are sure, and are still getting the problem, please post:

1-The code in your validate() method
2-The portion of your ApplicationResources file that shows the relevant messages
3-The portion of your struts-config.xml file that defines the message resources
4-The portion of your JSP thatis attempting to display your messages.
 
vamsi mummadi
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi my problem is solved. small mismatch in application resources.
now errors are displaying.
thank you for your response.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having the same problem but I'm trying to use the validation.xml file. I'm pretty sure it's failing validation like it should because I'm redirected back to the login page unless I enter anything for loginname.
Here is the info you asked for above (and a littel more):

1-The code in your validate() method


2-The portion of your ApplicationResources file that shows the relevant messages


3-The portion of your struts-config.xml file that defines the message resources


4-The portion of your JSP thatis attempting to display your messages.
Errors:<html:errors /><br>
5-Portion of the validation.xml for this form:


6-HTML of the form inputting the validated field:


I'd appreciate any help!
Thanks!
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't see anything out of order in what you've shown me so far, but I still need to see:

3-The portion of your struts-config.xml file that defines the message resources


What I need to see here is not your validation configuration, but your <message-resources> tag. It would also help for you to tell me where specifically your ApplicationResources.properties file is located. I'd suggest you read this link. It should help you troubleshoot message problems.
 
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic