Struts2: How to get fieldError value from Stack?

Now I want to judge whethe there is a field error for certain field(eg:user.username).

I want to get the fieldError value then judge whether it is null,but I can't get the value of the field which name is "user.username".

Please help me!

Thank you so much!

in ur java code, you can set ur error filed value like this:

public class UserAction {

  public String login {
     this.addFieldError("user.username", "format error"); 

 }

}

and in ur jsp page,write like this:
[code="java"]



user.username/s:param

/s:fielderror
[/code]

[code="java"]
 


field1 /s:param show errmsg by field1

/s:fielderror
[/code]

use /s:param to get your need.