I have two jsp pages one.jsp and two.jsp.
In one.jsp contains table row have a link when i click that link it redirects to two.jsp page and display data.
My problem is two.jsp page when result set(two.jsp) is empty not display two.jsp it is directly redirect to one.jsp page with an error message
Thank you
In you two.jsp if you get empty resultset you can redirect to one.jsp using following code:
RequestDispatcher requestDispatcher;
requestDispatcher = request.getRequestDispatcher("/two.jsp");
requestDispatcher.forward(request, response);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.