• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ActionErrors and error message from legacy system help needed

 
ashish kulkarni
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In my application error messages are sent by a
legacy
application, and dont come from properties file, so
how can i put these messages in my ActionErrors
class
so i can display them on jsp,
for example how can i do this??
in my code i have
ActionErrors errors = new ActionErrors();
String message="message from legacy
application";//suppose this is the message that
comes
from legacy application
errors.add(ActionErrors.GLOBAL_ERROR,new
ActionError(message));
but i get error when i do this,
so how can i make this work
 
Justin Chu
Ranch Hand
Posts: 209
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The messages in the Application Resource file can take up to four replacement parameters. The ActionError constructor takes several signatures so that you can specifiy the key and the needed parameters. To display an arbitrary message, add a line like this to your file:
errors.dynamic = {0}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic