| Author |
Can not show the ActionMessages
|
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 219
|
|
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.
|
Thanks in Advance,
Kousik
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
You've to check whether message present in scope or not, like
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 219
|
|
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
Joined: Feb 19, 2008
Posts: 2896
|
|
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
Joined: Sep 30, 2007
Posts: 219
|
|
|
Yes, I have used the correct tag.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
I'll debug:
|
 |
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 219
|
|
[color=red] [/color]
No Sagar...it is still giving the same error............
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
"name" should be "ok":
|
 |
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 219
|
|
ya....I have done it already.....this was just experimenting.................
One more thing...I am using struts 1.2....
|
 |
Kousik Majumder
Ranch Hand
Joined: Sep 30, 2007
Posts: 219
|
|
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
Joined: Feb 19, 2008
Posts: 2896
|
|
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.
|
 |
 |
|
|
subject: Can not show the ActionMessages
|
|
|