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 |
Can explain about the validations and in your project where did u used the validations?
What is the purpose of @doublerangefieldvalidator?
Can we have multiple struts config files in a single web app?
What is interceptor? And life cycle methods of interceptor?
What is Model 1 and Model 2?
What is actionservlet?
How tag libraries are defined in Struts?
What is the purpose of @conversion annotation annotation?
When it’s useful to use IncludeAction?
what is mean by custom tag?
where you use thread in your java project?
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?