wood burning stoves 2.0*
The moose likes Struts and the fly likes Error page in struts(Unable to get exception object) 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 "Error page in struts(Unable to get exception object)" Watch "Error page in struts(Unable to get exception object)" New topic
Author

Error page in struts(Unable to get exception object)

vamsi kris
Greenhorn

Joined: Feb 04, 2009
Posts: 28

Hi,

I am using struts 1.3.10, how to receive exception object in struts error page. I have declared global exception sin config file.

still if i get an exception, I am able to transfer to the error jsp, but exception object is null.

I have set isErrorPage="true" in jsp.

Please help me, its urgent.


SCJP 1.5 97%
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Add "handler" in the exception handling tag, a handler is a class which gets called when exception is not catch in Action classes. Use this exception handler class to set the exception object in request scope and then forward to the error page.

More here:
http://struts.apache.org/1.x/userGuide/building_controller.html#a4.5_Exception_Handler


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
vamsi kris
Greenhorn

Joined: Feb 04, 2009
Posts: 28

Thank you Sagar,
It helped me to come with a solution thanks a lot.
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

My pleasure
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error page in struts(Unable to get exception object)
 
Similar Threads
Error configuration
taglib uri of struts TLDs in JSPs
using ${exception.message}
Redirect internal server error to custom JSP
Page 461