Have you added you ActionErrors object in request scope. 

http://struts.apache.org/api/org/apache/struts/action/Action.html

Go this link and find the method SaveErrors

-ni3

-----Original Message-----
From: Khan [mailto:[EMAIL PROTECTED] 
Sent: 24 June 2005 10:33
To: user@struts.apache.org
Subject: problem while displaying error message

Hi,
  Iam using Struts1.0 ActionErrors and ActionError object to
store/display 
errors which is reading the errors from ApplicationResources file. Iam 
unable to display the error for dynamically generated values. Any idea 
please.
 My Code:
----------------
 String txtLoginId = "Manager" ; // txtLoginId value comes dynamically
as 
entered by the user
 ActionErrors errors = new ActionErrors();
 errors.add(Application.GLOBAL_ERRORS, new ActionError("
err.app.login.invalid")); // This works fine. The proper error which is 
given in resources file will be shown in the html page.
  String errMsg = txtLoginId +" , login id does not exits.";
 errors.add(Application.GLOBAL_ERRORS, new ActionError(errMsg)); // This

also works fine, but how to show this errMsg value in the html file by 
<html:errors /> 
 Thanks in advance.
 Regards
Khan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to