How the exceptions are handled in struts?



How the exceptions are handled in struts?..

Answer / Divyendu Singh

In Struts, exceptions can be handled using ActionException and ExceptionHandler interfaces. The ActionException is a runtime exception that is thrown by an action class when an unexpected error occurs. An ExceptionHandler is responsible for catching the ActionExceptions and handling them appropriately. You can define custom exception handlers in your struts-config.xml file to handle specific exceptions.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Struts Interview Questions

What is struts-default package and what are it’s benefits?

1 Answers  


How to explain struts work flow

12 Answers   CSS, iFlex, iGate, mpower, TCS,


Can we have more than one struts-config.xml file for a single struts application?

1 Answers  


What is the purpose of execute() method?

1 Answers  


What are inner class and anonymous class?

1 Answers  


What are the benefits of Interceptors in Struts2?

1 Answers  


How is token generated?

1 Answers  


What are the important methods of actionform?

1 Answers  


Provide some important Struts2 constants that you have used?

1 Answers  


in struts how to use hibernate with struts>

1 Answers   Infosys,


Can a reducer dispatch an action?

1 Answers  


What are pull and push mvc architecture and which architecture does struts2 follow?

1 Answers  


Categories