I am finding some difficulties with this particular case of path variable use in Spring MVC.
So I open an URL like this:
localhost:8080/my-project/utenze/my.username/confermaEmail/my.email@google.com
Into my controller class I have this controller method that handle URL like this:
@RequestMapping(value = "utenze/{username}/confermaEmail/{email}", method = RequestMethod.GET)
public String confermaModificaEmail(@RequestHeader(value = HEADER_USER_CG) String codicefiscale,
@PathVariable String username, @PathVariable String email, Model model) {
logger.info("INTO confermaModificaEmail(), indirizzo e-mail: " + email);
...................................................................
...................................................................
...................................................................
return "myView";
}
The previous request is correctly handled but I have the following problem with the email path variable value.
The problem is that the email path variable value is not my.emai@google.com as I expect but it is my.emai@google.
Spring is automatically deleting the last .com section of the inserted value.
Why? What is the problem? What am I missing? How can I try to solve this issue?