File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: e.getMessage() not get printed on JSP using ActionError
 
Similar Threads
Limitations on use of html:errors
validate() Method in action form
Using ActionErrors with Exceptions
Unhandled exception in lookup [Root exception is org.omg.CORBA.NO_PERMISSION
ActionError issue