Suppose we have very long database query in our business logic and user will not see the result on their request for some time. How to handle such situation in Servlet?
You should be able to set time out value for Statement/PreparedStatement/CallableStatement using below method. This time out applicable for sql/query getting executed under that statement.