}else{
//response.sendRedirect("/idp4java/endpoint");
//request.getRequestDispatcher("login.jsp").forward(request, response);
//response.sendRedirect("login.jsp");
Object osc = session.getAttribute("SimpleConsumer");
SimpleConsumer simpleConsumer = null;
try {
//Initialize SimpleConsumer
if(osc!=null){
simpleConsumer = (SimpleConsumer)osc;
}else{
simpleConsumer = new SimpleConsumer();
session.setAttribute("SimpleConsumer", simpleConsumer);
}
//Determine if we need to do Attribute Exchange or verify response
if(isAttribueExchangeResponse(request)){
simpleConsumer.verifyResponse(request);
}else{
simpleConsumer.authRequest("http://localhost:8081/idp4java/idp", request, response);
}
Object o = session.getAttribute("SUCCESS");
if(o!=null && (Boolean) session.getAttribute("SUCCESS") == Boolean.TRUE){
processLoginSuccess(request, response);