Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error page in struts(Unable to get exception object)

 
vamsi kris
Greenhorn
Posts: 28
Hibernate jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
vamsi kris
Greenhorn
Posts: 28
Hibernate jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Sagar,
It helped me to come with a solution thanks a lot.
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic