1
@RequestMapping(value = "/user/search/{email}")
    public String auditUseremail(@PathVariable("email") String email,Map<String, Object> map) {

        System.out.println(email);
}

this is my conroller class function, which is called when the action is http://localhost:8080/LACASServer/secure/user/search/[email protected]

as u can look, email is in URL, but when i print it in the above method, i get it [email protected], can anybody tell me, what can be the issue and how to resolve it.

1 Answer 1

1

I think you should use URL Encoding for this path and then decode it inside of controller

java.net.URLEncoder.encode(email, "ISO-8859-1");

You can read more about it here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.