wood burning stoves 2.0*
The moose likes Struts and the fly likes e.getMessage() not get printed on JSP using ActionError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "e.getMessage() not get printed on JSP using ActionError" Watch "e.getMessage() not get printed on JSP using ActionError" New topic
Author

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

David Dhune
Greenhorn

Joined: Sep 28, 2006
Posts: 14
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

Joined: May 24, 2003
Posts: 425
In the application resource property specify
 
jQuery in Action, 2nd edition
 
subject: e.getMessage() not get printed on JSP using ActionError
 
Similar Threads
Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION
ActionError issue
validate() Method in action form
Using ActionErrors with Exceptions
Limitations on use of html:errors