Guest User

Untitled

a guest
Jan 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. @RequestMapping(value = "/login", method = RequestMethod.POST,produces = "application/json")
  2. public @ResponseBody Map<String, String> validateUser(@RequestBody String loginParameters,HttpServletRequest request) throws Exception {
  3. try{
  4. HttpSession session=request.getSession();
  5. JSONObject json = new JSONObject(loginParameters.trim());
  6. String un=json.getString("username");
  7. session.setAttribute("username", un);
Add Comment
Please, Sign In to add comment