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
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 |
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 |
Answer / manjunath
by using database unavailable exception class()..
| Is This Answer Correct ? | 0 Yes | 3 No |
What is struts 2 framework in java?
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?
What are the various struts tag libraries?
What is struts in j2ee?
What is the purpose of @before?
Where can I get a copy of struts?
When should be opt for struts framework?
what is the current salary package in India for a java programmer who has 2 years experience
What is action class? What are the types of action class?
Is Struts Framework part of J2EE?
Why are frameworks used?
What is the difference between validation.xml and validator-rules.xml files in struts validation framework?