1.

How You Will Handle Exceptions In Struts?

Answer»

In Struts you can handle the exceptions in two ways:
a) DECLARATIVE EXCEPTION Handling: You can either define global exception handling tags in your struts-config.xml or define the exception handling tags within .. tag. 
EXAMPLE:

key="database.error.duplicate" 
PATH="/UserExists.jsp" 
TYPE="mybank.account.DuplicateUserException"/>
b) Programmatic Exception Handling: Here you can use try{}catch{} block to handle the exception. 

In Struts you can handle the exceptions in two ways:
a) Declarative Exception Handling: You can either define global exception handling tags in your struts-config.xml or define the exception handling tags within .. tag. 
Example:

key="database.error.duplicate" 
path="/UserExists.jsp" 
type="mybank.account.DuplicateUserException"/>
b) Programmatic Exception Handling: Here you can use try{}catch{} block to handle the exception. 



Discussion

No Comment Found