On the page service_A.jsp:
if(failed){ request.setAttribute("request_attr", "request_attr_value"); session.setAttribute("session_attr", "session_attr_value"); response.sendRedirect("service_B.jsp"); }else{ ... }
if(failed){ request.setAttribute("request_attr", "request_attr_value"); session.setAttribute("session_attr", "session_attr_value"); request.getRequestDispatcher("service_B.jsp").include(request, response); }else{ ... }