• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can not show the ActionMessages

 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Action class:-


.jsp:-

Error:-


Can somebody tell me that what to give in id attribute of html:messages tag and how to configure for that.
Please help.
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've to check whether message present in scope or not, like
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No...still it is not working...it is giving the same error........
Can you please tell the id attribute of html:messages.
In Spec it is written "The name of a page scope JSP bean that will contain the current element of the collection of messages on each iteration, if it is not null. [Required]"


What does that mean?
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Kousik Majumder wrote:No...still it is not working...it is giving the same error........


Have you tried with the correct tag, I misspelled it, correct one:
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I have used the correct tag.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll debug:
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[color=red] [/color]

No Sagar...it is still giving the same error............
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"name" should be "ok":
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya....I have done it already.....this was just experimenting.................

One more thing...I am using struts 1.2....
 
Kousik Majumder
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the problem is resolved if I use


But in this case the message is not showing. ...............'i m here' is getting shown......but the message from MessageResources.properties file is not getting shown.........
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're using the saveMessages(..), so <html:erorrs../> will be of no use. Try this link:
http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages.html#section4

Also post the action mapping for the same action.
 
Your mother is a hamster and your father smells of tiny ads!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic