• 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

ActionMessage not iterating

 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I'm adding ActionMessages in my Action using the following code:


and then use this piece to display the error in jsp


but only the first message is displayed. what am i doing wrong??
[ December 09, 2005: Message edited by: mannu kapoor ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try removing the <logic:present> tags, as they aren't necessary. Also, if the messages apply to the whole page and not just one field in the page, it is better to give ActionMessages.GLOBAL_MESSAGE as the message Id as in:

messages.add(ActionMessages.GLOBAL_MESSAGE, message);
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
get a "Cannot find bean messageId in any scope" servlet expception if i remove the logic resent tags.

Also had tried the ActionMessages.GLOBAL_MESSAGE arg but that dint work either...

any ideas
 
Pranav Sharma
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
but this worked

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic