Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to access actionErrors in Struts2?

 
Peter Lo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can someone please help me? What might the equivalent of the following Struts1 code be in Struts2? Is there maybe a way to access the actionErrors using the [s:if] tag?

[logic:messagesPresent]
//some custom HTML code

[ul][html:messages id="error"]
[li][bean:write name="error" filter="false"/][/li]
[/html:messages][/ul]

//some more custom HTML code
[/logic:messagesPresent]

I would appreciate any help that anyone could give.
 
swarna dasa
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think they have action errors n field errors

<s:actionerrors/>
<s:fielderrors/>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic