content = new HashMap<>();
+ content.put("code", "0");
+ content.put("message", "Login success");
+
// google ajax and sendRedirect
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
- response.getWriter().write("{\"code\":0, \"message\":\"Login success\"}");
+ response.getWriter().write(JSON.toJSONString(content));
}
}
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index 15b78a69..cab90aad 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -8,7 +8,7 @@
Hello .
Welcome to login java-sec-code application. Application Infomation
- CmdInject
+ CmdInject
JSONP
PathTraversal
SqlInject
@@ -17,5 +17,6 @@
...
logout
+