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

How does one create an action in struts 2?

689


What is discontinuous strut?

676


What is difference between lookupdispatchaction and dispatchaction?

844


What are the steps used to setup dispatch action?

694


while working struts in intellij 7.0error unable to initialize tld location cache: zip file is closed is displayed anybdy can answer me immdialy .ungert

2286


How can we work with error tags?

747


What is the use of interceptor?

699


What is apache struts framework?

707


What design patterns are used in struts?

735


What are different Struts2 tags? How can we use them?

734


What does i18n interceptor?

793


What is the purpose of struts.properties in struct2?

690


What is the use of forwardaction?

720


What is the use of web xml in struts2?

692


Why is action servlet a singleton in struts?

793