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 are result types in struts?
What are the cons of struts 2?
What is the purpose of form-beans tag in struct-config.xml?
What is the purpose of @urlvalidator annotation?
1.can we transfer a request from one struts application to another struts application? 2. how many types of action servlets r there what r they
What are the core classes of struts framework? Explain
What are the core components of a struct2 based application?
Can we integrate struts with spring?
How we can configured action mapping in struts?
What configuration changes are required to use Tiles in Struts?
What is the use of execAndWait interceptor?
Explain about the library tag?