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 differnce between 2-tier architecture and 3- tier architecture in java?

3 Answers  


why we are using vo,dao and dto design patterns in struts framework

3 Answers   Wipro,


What are the main classes which are used in struts application?

0 Answers  


What does modeldriven interceptor?

0 Answers  


What is actioninvocation in struts2?

0 Answers  


How do you find the struts version being used in a project?

0 Answers  


What is an interceptor stack?

0 Answers  


What is xml based validation in struts2?

0 Answers  


What is struts2 namespace?

0 Answers  


What happens when Two users requests for same action class? How the threads are controlled?

4 Answers  


how to get the last 10 elements using logic:iterate in struts with hiernate from database.

0 Answers   Wipro,


What's mvc pattern ?

0 Answers  


Categories