-1
public void handleRequest(HttpServletRequest request,
        HttpServletResponse response) throws ServletException, IOException {

    logger.debug("Entering in DirectPayPaymentResponseHandler handleRequest() method");
    logger.debug("responseParameter="
            + request.getParameter("responseParameter"));
    logger.debug("responseparams=" + request.getParameter("responseparams"));
    String respParams = request.getParameter("responseparams");

    try{
      boolean flag=processRequest(respParams);
      if(flag){
        //response.sendRedirect("http://localhost:8080/customer/Success.xhtml");            
      } else {
        //response.sendRedirect("http://localhost:8080/customer/Failure.xhtml");        
      }
    } catch(Exception e){
        logger.fatal("Error:- "+ e.getMessage());
    }
KeyNone
  • 8,745
  • 4
  • 34
  • 51
Suyash
  • 331
  • 1
  • 4
  • 20

1 Answers1

1

I'm assuming you are looking for a way to forward the request (ExternalContext is available in jsf, not servlets). A simple way to do that would be

RequestDispatcher rd = request.getRequestDispatcher("/path/filename.xhtml");
rd.forward(request,response);

This will not cause a second request from the browser like sendRedirect() does and keep all information sent available for further inspection.

Syren Baran
  • 444
  • 2
  • 8