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

Can explain about the validations and in your project where did u used the validations?

4 Answers   NIIT,


What is the purpose of @doublerangefieldvalidator?

0 Answers  


Can we have multiple struts config files in a single web app?

0 Answers  


What is interceptor? And life cycle methods of interceptor?

0 Answers  


What is Model 1 and Model 2?

3 Answers  






What is actionservlet?

0 Answers  


How tag libraries are defined in Struts?

0 Answers  


What is the purpose of @conversion annotation annotation?

0 Answers  


When it’s useful to use IncludeAction?

0 Answers  


what is mean by custom tag?

5 Answers   Wipro,


where you use thread in your java project?

1 Answers   Cap Gemini,


we have 7 jsp pages .At last page we have a submit button when we click it it will store all jsps data which we provide will store into database. when we starting providing data in jsp pages when we are at 3rd jsp at that time sessions timeout where the data will be store which we r provide in last two jsps?

2 Answers  


Categories