I am faced an issue @Pathvariable truncating after dot(.)
The code is followed as below
@RequestMapping(value = "{login}",method = GET)
public String getLogin(@PathVariable("login") String loginName)
{
return "/show";
}
the login value get before dot(.) value like username
instead of username.login
I found the solution at Spring MVC path variable truncating value after dot(.)
@RequestMapping(value = "{login:.+}",method = GET)
public String getLogin(@PathVariable("login") String loginName)
{
return "/show";
}
but after using the regexp .+
the issue solved but now I am facing another new issue. If the login contains email address
the following error displayed
HTTP Status 500 - Could not resolve view with name '/show' in servlet with name 'springmvc'
the above regexp work in remaining all cases.
In jetty server there is problem but in the tomcat server if the login name contains email address in the URL it gives HTTP 500 error.
can any one help me!