when connecting with the database,if database server is
down,ho can we handle this exception in struts,how can we
send error message to the user?

Answer Posted / madhu

Just create meaningful exception class (ie.
DatabaseUnavailableException) and catch it in your perform
() method. You can
then redirect to an error page from there.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of form-be tag in struct-config.xml?

559


Does struts include its own unit tests?

522


Is struts 1 still supported?

508


What is the forward action utilized for?

550


What is validate() and reset() functions?

560






How many Action classes have been used in your project? Differences between struts 1.1 and 1.3?

2530


Why it called struts?

557


What is the purpose of @expressionvalidator annotation?

590


List some struts tag libraries?

554


What do struts do?

516


What are the two different types of validations that the validator framework supports?

521


Which tag is used to declare constants in struts xml?

470


How the flow of various requests happens in struts application?

530


What is use of i18n interceptor?

538


In how many ways duplicate form submission can occurs?

562