Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping(value = "/login", method = RequestMethod.POST,produces = "application/json")
- public @ResponseBody Map<String, String> validateUser(@RequestBody String loginParameters,HttpServletRequest request) throws Exception {
- try{
- HttpSession session=request.getSession();
- JSONObject json = new JSONObject(loginParameters.trim());
- String un=json.getString("username");
- session.setAttribute("username", un);
Add Comment
Please, Sign In to add comment