diff --git a/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServiceServlet.java b/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServiceServlet.java index 8403765..b248bee 100644 --- a/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServiceServlet.java +++ b/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServiceServlet.java @@ -79,6 +79,7 @@ public class RegisterServiceServlet extends HttpServlet { Gson gson = new GsonBuilder().registerTypeAdapter(Jwks.class, new JwksDeserializer()).create(); jwks = gson.fromJson(jwksString, Jwks.class); if (jwks.getKeys()==null || jwks.getKeys().length==0) { + System.out.println("Something wrong with the keys."); request.getSession().setAttribute("msg_key_value_error_display", "display:block"); canProceed = false; } @@ -125,7 +126,13 @@ public class RegisterServiceServlet extends HttpServlet { } else { //something is wrong with the form and the error messages will appear - response.sendRedirect("./registeredServices"); + request.getSession().setAttribute("first_name", name); + request.getSession().setAttribute("description", description); + request.getSession().setAttribute("key_radio", keyType); + request.getSession().setAttribute("uri", jwksUri); + request.getSession().setAttribute("value", jwksString); + + response.sendRedirect("./registerService"); return; }