Action errors

"Nitin Gaur" <[email protected]>
Newsgroups gmane.comp.java.strutscx.user
Message-ID <[email protected]>
how to set errors in Action
Lets say I was doing like

/** Get a handle to the LoginActionForm */
LoginActionForm loginForm = (LoginActionForm) form;

/** Retrieve Username and Password */
String lUsername = loginForm.getTxtUsername();

/** Get ActionErrors instance */
ActionErrors lErrors = new ActionErrors();
if (!lUsername.equals("admin"))
lErrors.add("loginError",new ActionError("/root/variables/error/username_notfound"));

The element "/root/variables/error/username_notfound" contains the detailed error message in variables_en.xml

Then I add this error object to request.
The error object is serialized but only Element is created...where is the value??

<error>
    <loginError/>
</error>

What is the correct way to do it?

TIA
-Nitin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.