Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

e.getMessage() not get printed on JSP using ActionError

 
David Dhune
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My code is as follows it prints only the System.Exception value
which is in Application resource properties but not the e.getMessage()

Using System.out.println it prints it on console but not on the JSP page

Is some setting/ configuration is required to get the e.getMessage() printed on JSP

Thanks

Code Fragment

} catch (Exception e) {
System.out.println(e.getMessage());
errors.add("systemException", new ActionError
("System.Exception", e.getMessage()));
saveErrors(request, errors);
forward = mapping.findForward("error");
}

JSP page

<html:errors property="systemException"/>

Application resource properties file

System.Exception=Exception:

Result is Exception:
there is no e.getMessage() printed but the console prints it....

I also tried
errors.add("systemException", new ActionError
("System.Exception", "test"));

but same result... please help
 
Purushoth Thambu
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the application resource property specify
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic