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

How can I make own ActionServlet? with example

8 Answers   IBM, TCS,


How Struts will follow the MVC?

6 Answers   HCL,


What is front controller in struts2?

0 Answers  


How exceptions are handled in struts application?

0 Answers  


Give an example where struts tiles may be used?

0 Answers  






What is the difference between struts and spring? Explain

0 Answers  


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?

4 Answers   Wipro,


drawback of Validation Framework where and how to write the connection pool object in the programe how to debug the programe and application in struts without using eclips

1 Answers  


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

0 Answers  


How does interceptor work in struts2?

0 Answers  


What is the front controller in struts2?

0 Answers  


Is struts 1 still supported?

0 Answers  


Categories