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?

Answers were Sorted based on User's Feedback



when connecting with the database,if database server is down,ho can we handle this exception in str..

Answer / 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

when connecting with the database,if database server is down,ho can we handle this exception in str..

Answer / balaji

Create user defined exception catch it and redirect it to
error page

Is This Answer Correct ?    1 Yes 0 No

when connecting with the database,if database server is down,ho can we handle this exception in str..

Answer / sandeep

We can use setLoginTimeout() method of DriverManager
Class..to specify the amount of time it will wait for the
connection and if doesn't get any connection then we can
handle it..redirecting it to some error pages as we usually
do to forward to a specific page...

Is This Answer Correct ?    0 Yes 2 No

when connecting with the database,if database server is down,ho can we handle this exception in str..

Answer / manjunath

by using database unavailable exception class()..

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Struts Interview Questions

What is the purpose of @key annotation annotation?

0 Answers  


What are the advantages of spring mvc over struts mvc?

0 Answers  


What do you mean by dynaactionform?

0 Answers  


What is action servlet in struts?

0 Answers  


What are Struts2 core components?

0 Answers  






Explain design patterns which is used in struts?

0 Answers  


Explain about logic match tag?

0 Answers  


what is ForwardAction and IncludeAction in struts?

3 Answers   Mind Tree, Satyam,


What are the steps required for setting up validator framework in struts?

0 Answers  


Is Struts Framework part of J2EE?

0 Answers  


Hai all.Can i develope Struts action class without execute(-,- ,-,-)method.Ifd it's possible plz provide some sample code.

3 Answers   TCS,


What are the benefits of the struts system?

0 Answers  


Categories